Returns a Boolean value indicating whether an expression is an exception type.
Public Function IsError(ByVal Expression As Object) As Boolean
IsError returns True if the expression represents an Object variable that derives from the Exception class in the System namespace.
An exception that derives from System.Exception can be caught with the Try...Catch...Finally statements.
This example uses the IsError function to check if an expression represents a system exception.
Dim ReturnVal As Object Dim BadArg As String ' Name of out-of-range argument. Dim MyCheck As Boolean ' ... ReturnVal = New System.ArgumentOutOfRangeException(BadArg) ' ... MyCheck = IsError(ReturnVal) ' Returns True.
IsArray Function | IsDate Function | IsDBNull Function | IsNothing Function | IsNumeric Function | IsReference Function | Object Data Type | TypeName Function