THROW ERROR TRY CATCH :VIKAS MEHTA : DYNAMICS AX X++ CODE
If you want the details of the error then in the throw error section of the code replace it by the following code.
This will give you the details of the error in the infolog.
System.Exception ex;
try
{
FormletterService.Run()
}
catch(Exception::CLRError)
{
ex =
ClrInterop::getLastException();
if (ex
!= null)
{
ex = ex.get_InnerException();
if (ex != null)
{
throw error(ex.ToString());
}
}
}
No comments:
Post a Comment