LastCommandErrorCount (Daemon property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
 
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<span style="font-size:120%"><b>Number of counting errors for daemon.</b></span>
{{Template:Daemon:LastCommandErrorCount subtitle}}
 
<var>LastCommandErrorCount</var> returns the number of counting errors for the daemon (the Sirius <var>[[ERCNT_parameter|ERCNT]]</var> parameter value) from the last <var>[[Run (Daemon function)|Run]]</var> method. The method returns 0 if <var>[[Run (Daemon function)|Run]]</var> has yet to be invoked for that Daemon object.
LastCommandErrorCount is a member of the [[Daemon class]]
 
This method returns the number of counting errors for the daemon (the Sirius ERCNT parameter value) from the last Run method. The method returns 0 if Run has yet to be invoked for that Daemon object.
 
==LastCommandErrorCount Syntax==
<pre>
%num = %daem:LastCommandErrorCount
</pre>
 
===Syntax Terms===
<dl>
   
   
<dt>%num
==Syntax==
<dd>A numeric variable to contain the value of the number of counting errors.  
{{Template:Daemon:LastCommandErrorCount syntax}}
<dt>%daem
===Syntax terms===
<dd>A previously defined and instantiated Daemon object.  
<table class="syntaxTable">
</dl>
<tr><th>%number</th>
<td>A numeric variable to contain the value of the number of counting errors. </td></tr>
<tr><th>daemon</th>
<td>A previously defined and instantiated <var>[[Daemon class|Daemon]]</var> object.</td></tr>
</table>
   
   
Daemon objects set ERCNT to 0 after each request, so you might use lastCommandErrorCount as follows:
==Examples==
 
Daemon objects set <var>[[ERCNT_parameter|ERCNT]]</var> to 0 after each request, so you might use <var>lastCommandErrorCount</var> as follows:
<pre>
<p class="code"><nowiki>%daem:run('I FOOBAR')
%daem:run('I FOOBAR')
assert not %daem:lastCommandErrorCount
assert not %daem:lastCommandErrorCount
</pre>
</nowiki></p>


[[Category:Daemon class|LastCommandErrorCount]]
==See also==
[[Category:System methods]]
{{Template:Daemon:LastCommandErrorCount footer}}

Latest revision as of 21:04, 18 July 2011

Number of errors since the last Run invocation (Daemon class)

LastCommandErrorCount returns the number of counting errors for the daemon (the Sirius ERCNT parameter value) from the last Run method. The method returns 0 if Run has yet to be invoked for that Daemon object.

Syntax

%number = daemon:LastCommandErrorCount

Syntax terms

%number A numeric variable to contain the value of the number of counting errors.
daemon A previously defined and instantiated Daemon object.

Examples

Daemon objects set ERCNT to 0 after each request, so you might use lastCommandErrorCount as follows:

%daem:run('I FOOBAR') assert not %daem:lastCommandErrorCount

See also