NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

9.11.2 Unstructured error handling statements

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.

UnstructuredErrorStatement ::=
 ErrorStatement |
 OnErrorStatement |
 ResumeStatement