$ErrSet: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$ErrSet}}
{{DISPLAYTITLE:$ErrSet}}
<span class="pageSubtitle">Increment or clear number of counting errors, set $ERRMSG</span>
<span class="pageSubtitle">Increment or clear number of counting errors, set $Errmsg</span>


<p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.</p>


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.  
This function allows you to set or clear the current error message (which is returned by <var>[[$Errmsg]]</var>) and to increment or clear the number of "counting" errors.  


The <var>$ErrSet</var> function accepts one argument and returns a number indicating the current number of counting errors. As of <var class="product">[[Sirius Mods]]</var> Version 6.8, it is a [[Calling Sirius Mods $functions|callable]] $function.  
The <var>$ErrSet</var> function accepts one argument and returns a number indicating the current number of counting errors. It is a [[Calling Sirius Mods $functions|callable]] $function.  


The first argument is a string indicating the message to be returned by the next <var>$ERRMSG</var> 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==
==Syntax==
<p class="syntax">[%COUNT =] $ErrSet(string)
<p class="syntax">[<span class="term">%count</span> =] $ErrSet(<span class="term">string</span>)
</p>
</p>
<p>
Where:
<table>
<tr><th>%count</th><td>The number of "counting" errors.</td></tr>
 
<tr><th>string</th><td>A string indicating the message to be returned by the next <var>$Errmsg</var> 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.</td></tr>
</table>
 
==Example==
The following statement sequence sets <code>%junk</code> to <code>NASTY ERROR</code> and increments the number of counting errors.
<p class="code">%count = $ErrSet('NASTY ERROR')
%junk = $Errmsg
</p>
</p>
<p>%COUNT is the number of "counting" errors.</p>
For example
<p class="code"> %COUNT = $ErrSet('NASTY ERROR')
%JUNK = $ERRMSG
</p>
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]].
<p class="note"><b>Note:</b> You can also change the number of counting errors (the <var>[[ERCNT parameter|ERCNT]]</var> parameter) with <var>[[$Resetn]]</var>. </p>
 
==Products authorizing {{PAGENAMEE}}==  
==Products authorizing {{PAGENAMEE}}==  
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[List of $functions|Sirius functions]]</li>
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>Japanese functions</li>
<li>Japanese functions</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4b/SirfieldNew.pdf Sir2000 Field Migration Facility]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p>
</p>


[[Category:$Functions|$ErrSet]]
[[Category:$Functions|$ErrSet]]

Latest revision as of 22:51, 20 September 2018

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