Catch Error Message.
catch(Exception::CLRError)
{
System.Exception interopException = CLRInterop::getLastException();
obj.Add("Code", 1);
obj.Add("Message", interopException.Message.ToString());
}
catch
{
SysInfoLogEnumerator infoLogEnum;
str Message;
infoLogEnum = SysInfoLogEnumerator::newData(infolog.copy(1, infologLine()));
while(infoLogEnum.moveNext())
{
Message += infoLogEnum.currentMessage();
}
obj.Add("Code", 1);
obj.Add("Message", Message);
}