WR ON ERROR

4D - Documentation   Français   English   German   4D Write, Command Theme List   4D Write, Command Alphabetical List   4D Write, Constant Theme List   Back   Previous   Next

version 6.0


WR ON ERROR (method)

ParameterTypeDescription
methodStringName of method

Description

The WR ON ERROR command installs an interruption method defined and specified by method. This interruption method will be executed every time an error occurs during calls to 4D Write commands. This will allow monitoring of possible execution errors from within your application.

The called method will receive the 3 following parameters:

$1 represents the area,

$2 represents the error number,

$3 represents the error text.

Note: Due to database compilation, $1 and $2 must be declared as Long integers and $3 as Text.

Once method execution is finished, 4D will return to the interrupted formula.If method is an empty string, WR ON ERROR uninstalls the previously installed error method.

Example

You want to install an error management method for 4D Write.

      ` Call method
   WR ON ERROR("WriteArea")

      ` The WriteArea method displays the number and the error description that provoked the call
   ALERT ("Error number "+String($2)+Char(13)+$3)

See Also

Appendix C: Error Codes, WR Error number, WR Get on error method, WR ON EVENT.


4D - Documentation   Français   English   German   4D Write, Command Theme List   4D Write, Command Alphabetical List   4D Write, Constant Theme List   Back   Previous   Next