catchStatements1[Exit Try] Catch2 [
catchStatements2[Exit Try] . . . Catch
catchStatementsn] [Exit Try] [Finally
finallyStatements] End Try
exception(optional; System.Exception or a derived type)
The exception to catch. If
omitted or if it is System.Exception, all exceptions will be caught.
exception is omitted, no
information about the exception will be accessible within the
The data type of the exception to be handled by the
Catch block. Its value can be System.Exception or
any derived type. If omitted, its value defaults to System.Exception,
and all exceptions will be handled.
A logical expression that defines a condition under which the error
is to be handled by the
Used to handle runtime errors
tryStatements, which are required,
Try block and are the statements
that VB monitors for errors.
Catchblocks, of which
there can be more than one, contain code that is executed in response
to VB “catching” a particular type
of error within the
Try block. Thus, the
Catch blocks consist of the error-handlers for the
referred to as filters in the VB.NET documentation. In the former case, ...