Unstructured error handling is implemented using three statements: the Error
statement, the On
Error
statement and the Resume
statement.
When a method uses unstructured error handling, a single error handler is established for the entire method that catches all thrown exceptions. The method then keeps track of the "current" error handler location and the "current" exception that has been thrown. At entry to the method, the current error handler and the current exception are both set to Nothing
.
When an exception is thrown in a method that uses unstructured error handling, a reference to the exception object is stored in the object returned by the function Microsoft.VisualBasic.Information.Err
.