Skip to content

OnError - BusinessProcess

Provided as a hook to handle custom error reporting

Type: Event

Parameters

Parameter Type Description
ErrNum Integer The error number
iErrLine Integer The error line
ErrMsg String The error message

Syntax

Procedure OnError Integer ErrNum Integer iErrLine String ErrMsg

Description

This does nothing by default and is provided as a hook to handle custom error reporting. This message is designed for augmentation and should never be sent. It is sent whenever an error occurs (it is sent by Error_Report.).

This message is sent by Error_Report (which is itself called anytime an error occurs). If you study Error_Report, you will see that this procedure might have already logged the error in a status log (if Status_Log_State is true) and might have reported the error in a message box (if Display_Error_State is True). Often these options will be all that is required and there will be no need to augment this message.

If Status_Log_State is False and Display_Error_State is False (both of these are the defaults), then no error processing has occurred and you may wish to augment this procedure to handle an error.

By default, Cancel_Check stops the status panel if an error has occurred. To resume the status panel's display after an error has been handled, send Resume_Status.

The OnError event intentionally only passes custom error information. If you wish to obtain the error text of a non-custom error when intercepting OnError, you can use the Error_Text message to get the error text for predefined errors.