"Kevin Tang" <KevinTang@discussions.microsoft.com> wrote:
I want to know the different between try...catch and the
MFC version
TRY...CATCH.
Is there any document on the internet?
Just press F12 to go to definition while caret is on "TRY"
token. Basically, TRY/CATCH use language's try/catch (with
addition of small MFC bookeeping, see yourself definitions
of TRY/CATCH in afx.h file). Long time ago when not every
compiler supported exceptions and those that supported could
differ considerably MS defined TRY/CATCH macros to implement
MFC exceptions regardless of used compiler. Nowadays, MFC's
TRY/CATCH use C++ language's try/catch.
I am writing MFC application, which version of exception
handle is better?
TRY/CATCH with MFC exceptions classes (or derived from
CException).
For more info see:
"Exception Processing"
http://msdn2.microsoft.com/en-us/library/e583tzca.aspx
HTH
Alex