$Sir_Date_Err

From m204wiki
Revision as of 23:55, 24 September 2015 by JAL (talk | contribs) (remove category)
Jump to navigation Jump to search

Set and query default error handling at request level

Note: This $function require 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, and see the APPDATE command.

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.
'' (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 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.