$Sir Date Err: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (test modify category)
m (link repair)
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
<span class="pageSubtitle">Set and query default error handling at request level</span>
<span class="pageSubtitle">Set and query default error handling at request level</span>


<p class="warn"><b>Note:</b> This $function require the <var class="product">[[Media:Ul2krNew.pdf|Sir2000 User Language Tools]]</var> product. </p>  
<p class="warn"><b>Note:</b> This $function requires the <var class="product">[[Sir2000 User Language Tools]]</var> product. </p>  


The <var>$Sir_Date_Err</var> function may be used to set or query the
The <var>$Sir_Date_Err</var> function may be used to set or query the
Line 8: Line 8:


For more information on datetime error control, refer to
For more information on datetime error control, refer to
[[#Error handling control with DATE_ERR|Error handling control with DATE_ERR]], and see the <var>[[APPDATE command|APPDATE]]</var> command.
[[The Sir2000 APPDATE command#Error handling control with DATE_ERR|Error handling control with DATE_ERR]].


===Syntax===
===Syntax===
Line 22: Line 22:
<table class="thJustBold">
<table class="thJustBold">
<tr><th>OFF</th>
<tr><th>OFF</th>
<td>Indicates that default datetime $function error handling is determined by the USER level setting or, if that is off, by the SYSTEM level setting.</td></tr>
<td>Indicates that default datetime $function error handling is determined by the <var>USER</var> level setting or, if that is off, by the <var>SYSTEM</var> level setting.</td></tr>


<tr><th>CANCEL</th>
<tr><th>CANCEL</th>
Line 33: Line 33:
<td>Indicates that if a datetime $function detects an error, the default behavior is to silently return the appropriate error value to the function caller.</td></tr>
<td>Indicates that if a datetime $function detects an error, the default behavior is to silently return the appropriate error value to the function caller.</td></tr>


<tr><th>&apos;&apos; (or empty argument)</th>
<tr><th>null string (&apos;&apos;) or empty argument</th>
<td>Does not affect the current request-level error processing defaults. Provided as a method to obtain the current <var>$Sir_Date_Err</var> setting.</td></tr>
<td>Does not affect the current request-level error processing defaults. Provided as a method to obtain the current <var>$Sir_Date_Err</var> setting.</td></tr>
</table></td></tr>
</table></td></tr>
Line 43: Line 43:


<p class="note"><b>Note:</b> <var>$Sir_Date_Err</var> only sets the <b><i>default</i></b> datetime argument error handling.
<p class="note"><b>Note:</b> <var>$Sir_Date_Err</var> only sets the <b><i>default</i></b> datetime argument error handling.
It will affect the standard SOUL date $functions, but it will only affect the Sirius date $functions if they are coded without an error control argument.</p>
It affects the [[SOUL $functions#datex|standard SOUL date $functions]], but it will only affect the [[SOUL $functions#datetime|$Sir_Datexxx $functions]] and [[Sir2000 User Language Tools $functions]] if they are coded without an error control argument.</p>


[[Category:$Functions|SirSir]]
[[Category:Sir2000 User Language Tools $functions]]
[[Category:Sir2000 User Language Tools $functions]]

Latest revision as of 20:03, 6 February 2018

Set and query default error handling at request level

Note: This $function requires the Sir2000 User Language Tools product.

The $Sir_Date_Err function may be used to set or query the default request-level datetime error handling.

For more information on datetime error control, refer to Error handling control with DATE_ERR.

Syntax

%oldvalue = $Sir_Date_Err(newvalue)

Where:

%oldvalue Set to the most recent valid non-null setting of $Sir_Date_Err.
newvalue An optional error control string, which must contain one of the following values:
OFF Indicates that default datetime $function error handling is determined by the USER level setting or, if that is off, by the SYSTEM level setting.
CANCEL Indicates that if a datetime $function detects an error, the default behavior is to issue an error message and cancel the SOUL request.
REPORT Indicates that if a datetime $function detects an error, the default behavior is to issue a warning message and return the appropriate error value to the function caller.
IGNORE Indicates that if a datetime $function detects an error, the default behavior is to silently return the appropriate error value to the function caller.
null string ('') or empty argument Does not affect the current request-level error processing defaults. Provided as a method to obtain the current $Sir_Date_Err setting.

The request-level datetime error handling defaults set by a $Sir_Date_Err invocation persist until the end of the SOUL request, at which time its setting is reset to OFF.

Note: $Sir_Date_Err only sets the default datetime argument error handling. It affects the standard SOUL date $functions, but it will only affect the $Sir_Datexxx $functions and Sir2000 User Language Tools $functions if they are coded without an error control argument.