TRY-CATCH vs. try-catch 
Author Message
 TRY-CATCH vs. try-catch

Is there any difference between using MFC's TRY-CATCH exception handling
versus ANSI's try-catch. I remember there being slight differences in what
they do in VC versions prior to 5.0. Are there any caveats in using one over
the other. My company wishes to standardize on a single technique if
possible.

thanks

Mike



Mon, 06 Nov 2000 03:00:00 GMT  
 TRY-CATCH vs. try-catch

My experience has been that the MFC TRY/CATCH works all the time in MFC
apps, whereas I've seen "weirdness" with try/catch.  I never bothered to
research "why" -- I just use TRY/CATCH.

--
Jeff May
Express Software Services, Inc

Quote:

>Is there any difference between using MFC's TRY-CATCH exception handling
>versus ANSI's try-catch. I remember there being slight differences in what
>they do in VC versions prior to 5.0. Are there any caveats in using one
over
>the other. My company wishes to standardize on a single technique if
>possible.

>thanks

>Mike



Mon, 06 Nov 2000 03:00:00 GMT  
 TRY-CATCH vs. try-catch



Quote:
>Which try/catch pair is efficient to use to term of speed and executabe
>size?

In the past, when VC++ didn't support exception handling yet, TRY/CATCH
were inefficient, inelegant and not-too-flexible macros, but they were
better than nothing.

After a few time VC++ introduced the support for the new C++ features (with
exception handling being one of them), so you had to choose.
And you would have had better choose the standard C++ way.

As of now, TRY/CATCH macros are just wrappers around try/catch kept for
backward compatibility.
This means that there is no real speed/size difference today, so my advice
is to use C++ try/catch.

Quote:

> Is there any difference between using MFC's TRY-CATCH exception handling
> versus ANSI's try-catch. I remember there being slight differences in what
> they do in VC versions prior to 5.0. Are there any caveats in using one over
> the other. My company wishes to standardize on a single technique if
> possible.

> thanks

> Mike



Mon, 06 Nov 2000 03:00:00 GMT  
 TRY-CATCH vs. try-catch

try-catch is recommended by Microsoft to replace old macro TRY-CATCH.  I
believe TRY-CATCH is still structure exception handling which is obsoleted
and replace with ANSI C++ exception handling (unwinding and object clean up
more efficient)

Quote:

>Is there any difference between using MFC's TRY-CATCH exception handling
>versus ANSI's try-catch. I remember there being slight differences in what
>they do in VC versions prior to 5.0. Are there any caveats in using one
over
>the other. My company wishes to standardize on a single technique if
>possible.

>thanks

>Mike



Mon, 06 Nov 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. try/catch VS TRY/CATCH

2. Can you catch CDBExection with try-catch keyword?

3. why {try catch} does not catch

4. Q: Why try catch cannot catch the exception

5. CArchiveException vs. try/catch

6. Exception Handling and CDatabase / CRecordset: try-catch( CDBException cdbe) vs. try-catch (...)

7. Try catch blocks - can multiple methods share a single try/catch combination?

8. Try catch blocks - can multiple methods share a single try/catch combination?

9. try-catch-finally problem (I think?)

10. newbie Q: debugging try/catch

11. try catch weird effect

12. Try/Catch performance hit

 

 
Powered by phpBB® Forum Software