$ErrSet

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Increment or clear number of counting errors, set $Errmsg

Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.

This function allows you to set or clear the current error message (which is returned by $Errmsg) and to increment or clear the number of "counting" errors.

The $ErrSet function accepts one argument and returns a number indicating the current number of counting errors. It is a callable $function.

Syntax

[%count =] $ErrSet(string)

Where:

%countThe number of "counting" errors.
stringA string indicating the message to be returned by the next $Errmsg call. If this argument is omitted or null, the current error message is cleared and the number of counting errors is set to 0; otherwise the number of counting errors is incremented.

Example

The following statement sequence sets %junk to NASTY ERROR and increments the number of counting errors.

%count = $ErrSet('NASTY ERROR') %junk = $Errmsg

Note: You can also change the number of counting errors (the ERCNT parameter) with $Resetn.

Products authorizing $ErrSet