$ErrSet

From m204wiki
Revision as of 16:01, 12 June 2015 by JAL (talk | contribs) (minor cleanup)
Jump to navigation Jump to search

Increment or clear number of counting errors, set $Errmsg

Note: Most Sirius $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.

The first argument is a 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.

Syntax

[%count =] $ErrSet(<span class="term"string)

%COUNT is the number of "counting" errors.

For example

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

would set %junk to NASTY ERROR and would increment the number of counting errors.

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

Products authorizing $ErrSet