WHENEVER Actions

 

WHENEVER actions include CONTINUE, STOP, CALL AND GOTO. The CALL action can invoke built-in or programmer defined functions which will be executed when 4GL encounters the specified event. The CALL handler now can invoke some Querix standard processing functions which handle the events. The following functions can be called within the WHENEVER statement:

The WHENEVER is an easy way to instruct a program what should be done, if an exceptional behavior is spotted, instead of inserting specific 4GL code with the instructions after each statement that may result in an exceptional behavior.

 

WHENEVER ERROR STOP and WHENEVER ERROR CONTINUE statements check the value of the status built-in variable to define whether an error has occurred.

 

The default action which 4GL undertakes on encountering any of the exceptional conditions is CONTINUE.