locked
Why is try / catch / finally not supported in C++ / CX?

    Question

  • What happened to try / catch / finally???

       try
       {
          // call something that might throw an exception
       }
       catch (Exception ^ ex) // must have catch, otherwise error: C2317
       {
          throw ex; // just re-throw b/c I didn't want to catch it in the first place
       }
       finally // Error: C2065
       {
          // do cleanup here
       }

    Seems like another big step backwards for C++ / CX and WinRT.
    Wednesday, May 16, 2012 3:07 PM

All replies