The Finally statement will still be executed. Execution resumes with the code immediately following the End Try statement. Keyword that breaks out of the structure. Statement(s) to handle errors that occur in the associated Try block. Used with When keyword to specify circumstances under which the error is caught. Typically used to filter by error number. Any expression that describes a generic filter. Must be implicitly convertible to Boolean. A When clause is applied only after checking the type of the exception, and expression may refer to the identifier representing the exception. A Catch statement with a When clause catches exceptions only when expression evaluates to True. If the value of exception is of the type specified by type or of a derived type, the identifier becomes bound to the exception object. If omitted, the Catch statement catches any exception. Used with Catch to specify the error caught. The initial value of exception is the value of the thrown error. If an exception occurs when processing the Try block, each Catch statement is examined in textual order to determine whether it handles the exception, with exception representing the exception that has been thrown. Provides a way to handle some or all possible errors that may occur in a given block of code, while still running code.
0 Comments
Leave a Reply. |