4D Write v16

WR ON ERROR

Home

 
4D Write v16
WR ON ERROR

WR ON ERROR 


 

WR ON ERROR ( method ) 
Parameter Type   Description
method  String in Name of method

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

 
PROPERTIES 

Product: 4D Write
Theme: WR Utilities
Number: 89178

 
HISTORY 

Created: 4D Write 6

 
ARTICLE USAGE

4D Write Language ( 4D Write v16)