Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Convert projects from Visual Stuido 2005 to Visual Studio 2003 Pin
Nish Nishant4-Jan-06 5:56
sitebuilderNish Nishant4-Jan-06 5:56 
GeneralRe: Convert projects from Visual Stuido 2005 to Visual Studio 2003 Pin
Allad4-Jan-06 10:04
Allad4-Jan-06 10:04 
AnswerRe: Convert projects from Visual Stuido 2005 to Visual Studio 2003 Pin
Bob Stanneveld4-Jan-06 8:06
Bob Stanneveld4-Jan-06 8:06 
GeneralRe: Convert projects from Visual Stuido 2005 to Visual Studio 2003 Pin
Allad4-Jan-06 11:47
Allad4-Jan-06 11:47 
GeneralRe: Convert projects from Visual Stuido 2005 to Visual Studio 2003 Pin
Bob Stanneveld5-Jan-06 2:25
Bob Stanneveld5-Jan-06 2:25 
QuestionHow to differentiate between shutdown and restart. Pin
ashtwin4-Jan-06 1:14
ashtwin4-Jan-06 1:14 
AnswerRe: How to differentiate between shutdown and restart. Pin
Zdeslav Vojkovic4-Jan-06 1:34
Zdeslav Vojkovic4-Jan-06 1:34 
AnswerRe: How to differentiate between shutdown and restart. Pin
vikas amin4-Jan-06 4:13
vikas amin4-Jan-06 4:13 
QuestionDifferentation Pin
dvo_19884-Jan-06 0:44
dvo_19884-Jan-06 0:44 
AnswerRe: Differentation Pin
Zdeslav Vojkovic4-Jan-06 1:18
Zdeslav Vojkovic4-Jan-06 1:18 
QuestionVB Active X on a VC++ dialog Pin
GayathriNaveen4-Jan-06 0:25
GayathriNaveen4-Jan-06 0:25 
Questionhow to copy values only from one com object (Interface) Pin
gpshadrach4-Jan-06 0:11
gpshadrach4-Jan-06 0:11 
AnswerRe: how to copy values only from one com object (Interface) Pin
Prakash Nadar4-Jan-06 0:34
Prakash Nadar4-Jan-06 0:34 
QuestionC++ Exceptions Pin
Chintoo7234-Jan-06 0:06
Chintoo7234-Jan-06 0:06 
AnswerRe: C++ Exceptions Pin
Zdeslav Vojkovic4-Jan-06 0:41
Zdeslav Vojkovic4-Jan-06 0:41 
GeneralRe: C++ Exceptions Pin
Chintoo7234-Jan-06 1:17
Chintoo7234-Jan-06 1:17 
GeneralRe: C++ Exceptions Pin
Zdeslav Vojkovic4-Jan-06 2:02
Zdeslav Vojkovic4-Jan-06 2:02 
GeneralRe: C++ Exceptions Pin
Chintoo7234-Jan-06 2:37
Chintoo7234-Jan-06 2:37 
GeneralRe: C++ Exceptions Pin
Zdeslav Vojkovic4-Jan-06 3:38
Zdeslav Vojkovic4-Jan-06 3:38 
GeneralRe: C++ Exceptions Pin
Chintoo7234-Jan-06 3:45
Chintoo7234-Jan-06 3:45 
GeneralRe: C++ Exceptions Pin
Zdeslav Vojkovic4-Jan-06 3:54
Zdeslav Vojkovic4-Jan-06 3:54 
GeneralRe: C++ Exceptions Pin
markkuk4-Jan-06 12:49
markkuk4-Jan-06 12:49 
GeneralRe: C++ Exceptions Pin
Jared Parsons4-Jan-06 5:38
Jared Parsons4-Jan-06 5:38 
AnswerRe: C++ Exceptions Pin
<color>Aljechin 4-Jan-06 0:45
<color>Aljechin 4-Jan-06 0:45 
Britley wrote:
I started using try/catch(...) in C++, but not sure what all can be done in the catch block.

1. Anything that is holy, practically. Big Grin | :-D

Britley wrote:
1. What does the elipsis (...) mean?

(...) Catch any exception that occurs

Britley :->wrote:
What else can be put here?

A known exception type can be put here which has to be caught. Eg: catch(CFileException Cfe)

Britley wrote:
If so, how do you define an exception class? Is there an interface that we should implement?

There are a bunch of exceptions. You will not need to implement any interface. You can use any existing exception.

Britley wrote:
4. When we have the elipsis(...) how do you get the details of the exception?

There is one API call known as GetLastError for this purpose


Britley wrote:
5. Are there simple examples anywhere that demonstrate exceptions in C++ for Java programmers


<br />
TRY<br />
{<br />
CDatabase DB;<br />
CRecordset Rc;<br />
CString szSql = "SELECT * FROM MYTABLE WHERE AGE = 20"<br />
DB.ExecuteSql(szSql);<br />
}CATCH(CDatabaseException CDbe){ AfxMessageBox(CDBE->m_error));}<br />


I believe above things are right. I a newbie too, but have worked on a database module. I am sure you will get a bunch of replies and guidance. Smile | :)

Aljechin Alexander
GeneralRe: C++ Exceptions Pin
Zdeslav Vojkovic4-Jan-06 0:58
Zdeslav Vojkovic4-Jan-06 0:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.