HOW TO GET ERROR MESSAGE IN TRY CATCH
System.Exception exception;
try
{
}
catch(Exception::CLRError)
{
exception = CLRInterop::getLastException();
while(exception)
{
error( exception.get_Message() );
exception = exception.get_InnerException();
}
throw Exception::Error;
}
NOTE: Code inside the catch statement will only get executed of the tts level is zero.
{
exception = CLRInterop::getLastException();
while(exception)
{
error( exception.get_Message() );
exception = exception.get_InnerException();
}
throw Exception::Error;
}
NOTE: Code inside the catch statement will only get executed of the tts level is zero.
Thanks,
Vikas Mehta
No comments:
Post a Comment