11-06-2006 09:41 AM
11-07-2006 12:21 PM
Handling errors is easy and hard, depending on how much information you want at runtime. Any exception thrown in a call to a property or method is converted into a LV error w/ error code 1172. The information on the exception is then put into the error text, which is okay for humans to read, but I don't recommend writing code to try to parse it (at a minimum, we don't say that the format may not change in the future). Unfortunately, there isn't a way to get the exception object currently.
Therefore, you might want to think about saving off the exception object yourself (wrap your methods w/ a try/catch and a rethrow in the catch) in the object instance and expose it as a property. Thus you can access it via code at runtime for error handling cases. This, of course, assumes the server is either single threaded, or you'll use TLS (thread local storage) to store off the exception for the last method invoked.
Anyway, those are some initial thoughts on the matter. Feel free to reply w/ comments or questions.
11-24-2017 08:18 AM
Hello,
I look at this thread which is from 2006. It says that there is no way to get information about .NET exception, except that parsing the text error.
Nowadays, Is there a way to get information about a .NET exception, for exemple a code, the name of the exception ...
I use an assemby and I can't modify the code of this assemby
Thanks
Laurent