How to define exception type

Hi all,

How to catch an exception and assign it to a variable. I can catch an exception in a catch block, but I don’t know what type of exception is it.


Esther Mulijono

X++ doesn’t use objects for exceptions like in C#, for example. If you call throw error(“Something”); it actually adds the message to infolog and calls throw Exception::Error. There is no any additional information available.

You still can process exceptions thrown by .NET code - get System.Exception object by CLRInterop::getLastException();.

Thank you for the quick reply, Martin :slight_smile: