Click here to Skip to main content
16,017,788 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Exception! Pin
Rajesh R Subramanian2-Jun-07 2:00
professionalRajesh R Subramanian2-Jun-07 2:00 
AnswerRe: Exception! Pin
Matthew Faithfull2-Jun-07 1:59
Matthew Faithfull2-Jun-07 1:59 
JokeRe: Exception! Pin
Rajesh R Subramanian2-Jun-07 2:02
professionalRajesh R Subramanian2-Jun-07 2:02 
GeneralRe: Exception! Pin
kcynic2-Jun-07 2:15
kcynic2-Jun-07 2:15 
AnswerRe: Exception! Pin
Matthew Faithfull2-Jun-07 2:43
Matthew Faithfull2-Jun-07 2:43 
GeneralRe: Exception! Pin
kcynic2-Jun-07 21:40
kcynic2-Jun-07 21:40 
GeneralRe: Exception! Pin
Matthew Faithfull3-Jun-07 2:43
Matthew Faithfull3-Jun-07 2:43 
AnswerRe: Exception! Pin
Stephen Hewitt3-Jun-07 14:21
Stephen Hewitt3-Jun-07 14:21 
That's not scary, it's normal.

In standard C++ try/catch can only catch C++ exceptions: that is only exceptions that are raised by the C++ throw statement. Unfortunately some version of Microsoft Visual C++ (6.0 and below) do not follow the standard in this regard. This was fixed in later versions but the old non-standard behaviour can be selected with the /EHa[^] switch (not a good idea in general).

__try/__except is a low level construct and can catch any exception. Note however that with __try/__except the destructors of objects on the stack as it is unwound are not called, so this construct doesn’t play nice with C++. It will break the RAII pattern for example.

Steve

QuestionTo allign text in message box Pin
Mushtaque Nizamani2-Jun-07 0:29
Mushtaque Nizamani2-Jun-07 0:29 
AnswerRe: To allign text in message box Pin
Rajesh R Subramanian2-Jun-07 0:43
professionalRajesh R Subramanian2-Jun-07 0:43 
QuestionInverse of a matrix(urgent:) Pin
sujithkumarsl1-Jun-07 23:50
sujithkumarsl1-Jun-07 23:50 
AnswerRe: Inverse of a matrix(urgent:) Pin
Rajesh R Subramanian2-Jun-07 0:22
professionalRajesh R Subramanian2-Jun-07 0:22 
GeneralRe: Inverse of a matrix(urgent:) Pin
Mark Salsbery2-Jun-07 5:22
Mark Salsbery2-Jun-07 5:22 
AnswerRe: Inverse of a matrix(urgent:) Pin
toxcct2-Jun-07 6:04
toxcct2-Jun-07 6:04 
JokeWRONG!! Pin
Rajesh R Subramanian2-Jun-07 8:37
professionalRajesh R Subramanian2-Jun-07 8:37 
QuestionWH_KEYBOARD_LL Pin
nitin31-Jun-07 22:27
nitin31-Jun-07 22:27 
AnswerRe: WH_KEYBOARD_LL Pin
Rajesh R Subramanian1-Jun-07 22:43
professionalRajesh R Subramanian1-Jun-07 22:43 
Question860312 - using macros Pin
ilostmyid21-Jun-07 22:08
professionalilostmyid21-Jun-07 22:08 
QuestionCLSID Pin
john56321-Jun-07 22:00
john56321-Jun-07 22:00 
AnswerRe: CLSID Pin
Matthew Faithfull1-Jun-07 22:45
Matthew Faithfull1-Jun-07 22:45 
QuestionCSplitterWnd Pin
TariqZ1-Jun-07 21:21
TariqZ1-Jun-07 21:21 
AnswerRe: CSplitterWnd Pin
Hamid_RT1-Jun-07 21:58
Hamid_RT1-Jun-07 21:58 
AnswerRe: CSplitterWnd Pin
Mark Salsbery2-Jun-07 5:28
Mark Salsbery2-Jun-07 5:28 
QuestionMail -mfc Pin
prathuraj1-Jun-07 20:09
prathuraj1-Jun-07 20:09 
GeneralRe: Mail -mfc Pin
Matthew Faithfull1-Jun-07 21:56
Matthew Faithfull1-Jun-07 21:56 

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.