Determines if errors are raised as exceptions in the application.
Read-write property
Visual Basic |
---|
Public Property RaiseExceptions As Boolean |
A boolean value which is True to raise errors as exceptions. Otherwise, False is returned.
The default value is True.
If set to True, the component requires an On Error GoTo statement and a label to catch the exception, as outlined below:
On Error GoTo ErrorHandler
myControl.RaiseExceptions = True
...
myControl.DoSomething
...
ErrorHandler:
Log "Caught exception from Accusoft control: number = " _
& (Err.Number - vbObjectError) _
& ", description = '" & Err.Description & "'"
To get the last error number and description, use the ErrorCode and ErrorDescription properties.
If set to False, only return the error property results from ErrorCode and/or ErrorDescription.