In this article you can see how to protect a code section and manage errors.


Consider this case: on a form event there is a procedure that runs some code potentially prone to raise an exception. This critic code is inserted in a Try/Catch block and in the Catch block it is possibile to insert the Throw activity to relaunch the original exception:




If an exception occurs, it is caught in the catch block and an exception is raised, using the System.Exception builder, that accepts a message and a InnerException. In the message, it is possible to insert a string that allows the global exception manager to understand that it is an exception to manage and in the InnerException it is possible to add the actual exception.


Inside the Global Error Handler you could get the following: