Command PV ON ERROR

4D View

PV ON ERROR

version 6.8


PV ON ERROR (method)

ParameterTypeDescription
methodString4D View method

Description

The PV ON ERROR command installs the method to manage 4D View errors.

This interruption method is executed every time an error occurs during a 4D View command call, thereby allowing control of eventual execution errors.

The called method receives 3 parameters:

$1 : 4D View area reference

$2 : Error number

$3 : Error text

The numbers and the labels of errors generated by 4D View are provided in Appendix A, List of 4D View error codes.

To uninstall method, simply call the PV ON ERROR command with an empty string as a parameter.

Example

Install an error management method for the active 4D View area.

   If (PV Get on error method #"ErrMethMan")  `Manager not installed?
      PV ON ERROR ("ErrMethMan")  `Call method
   End if

The code for the "ErrMethMan" is as follows :


   C_LONGINT ($1)  `4D View area reference
   C_LONGINT ($2)  `Error number
   C_TEXT ($3)  `Error text

   ALERT ("Internal error number "+String (ErrorNum)+Char (13)+ErrorText)

See Also

Appendix A, List of 4D View error codes, PV GET LAST ERROR, PV Get on error method.