ATL exception handling

This is a discussion on ATL exception handling within the Windows Programming forums, part of the Platform Specific Boards category; hi gang ; i suppose ATL projects don't support mfc or standard c++ exception handling . it took me a ...

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    21

    ATL exception handling

    hi gang ;
    i suppose ATL projects don't support mfc or standard c++ exception handling .
    it took me a while tracking my project finding ATL encoding runtime error like while i wanted to wrapp a piece of ATL codes around standard c++ try cath clause.

    however i couldn't use __try __except caluse due to stack unwinding problem .


    now i'm wondering if anyone can tell me how to power my ATL code with exception handling.

    thanks in advanced.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    >> i suppose ATL projects don't support mfc or standard c++ exception handling
    Sure you can, on both accounts.
    However, using MFC in an ATL project is more "advanced" subject and should only be attempted if you really know MFC and how it works under the hood.

    >> however i couldn't use __try __except caluse due to stack unwinding problem
    Structured Exception Handling (SEH) is an MSVC specific feature for catching hardware and software exceptions (like bus errors or divide by 0).

    If you want to put SEH around code which requires "object unwinding", then you have to put that code in a function and wrap the function......ie
    Code:
    __try
    {
        foo();
    }
    ...
    gg
    Last edited by Codeplug; 06-10-2004 at 07:23 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. signal handling and exception handling
    By lehe in forum C++ Programming
    Replies: 2
    Last Post: 06-15-2009, 11:01 PM
  2. Exception handling in a large project
    By EVOEx in forum C++ Programming
    Replies: 7
    Last Post: 01-25-2009, 07:33 AM
  3. exception handling
    By coletek in forum C++ Programming
    Replies: 2
    Last Post: 01-12-2009, 05:28 PM
  4. is such exception handling approach good?
    By George2 in forum C++ Programming
    Replies: 8
    Last Post: 12-27-2007, 08:54 AM
  5. Signal and exception handling
    By nts in forum C++ Programming
    Replies: 23
    Last Post: 11-15-2007, 02:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21