Wednesday, June 1, 2011

CLR Exception Catch

Query: How to catch CLR Exception?
Answer:  
catch (Exception::CLRError)
{
        info("Caught 'Exception::CLRError'.");
        netExcepn = CLRInterop::getLastException();
        info(netExcepn.ToString());
}

1 comment:

  1. If you need the InnerException:

    http://axbrasil.com/2013/03/22/dax2009-handling-net-exceptions/

    ReplyDelete