Skip to main content

%SYSTEM.Status

abstract class %SYSTEM.Status extends %SYSTEM.Help

This is a helper class that is used to construct and display/decompose status codes.

Many methods in this class use the qspec argument, which is a list of flags or qualifiers. See System Flags and Qualifiers.

Method Inventory

Methods

classmethod AppendStatus(statuscode1 As %Status, statuscode2 As %Status) as %Status
Return a new status code that is the combination of the two status codes. For example, if both statuscode1 and statuscode2 contain errors, then the new status code will contain 2 error messages.
classmethod DecomposeStatus(statuscode As %Status, ByRef errorlist, qspec As %String, language As %String) as %Status
Returns the error text and error information for statuscode; this information is returned by reference through the errorlist parameter. The errorlist parameter is a multidimensional array containing information about each error. If the errorlist array already contains values, the method appends the new values.

If the qspec parameter contains the "d" flag, then the error text is also displayed to the screen.

To return the error text in a different language, pass a language code as the language parameter.

classmethod DisplayError(statuscode As %Status) as %Status
Display the error text for statuscode.
classmethod EmbedStatus(statuscode1 As %Status, statuscode2 As %Status) as %Status
classmethod Equals(statuscode As %Status, statusids...) as %Boolean
Return true if the domain/msgid of statuscode equals any of the following error code domain/msgid arguments
classmethod Error(errorcode As %Integer, message1 As %String, message2 As %String, message3 As %String) as %Status
Return an error status code with the error as specified by the errorcode. Some error codes accept addition parameters as embedded message in the error text.
classmethod GetErrorCodes(statuscode As %Status) as %String
Returns the error codes for statuscode as a comma-delimited list.
classmethod GetErrorText(statuscode As %Status, language As %String) as %String
Returns the error text for statuscode. If there is more than one error in the statuscode, then the multiple error text strings are separated by <CRLF>.

To return the error text in a different language, pass a language code as the language parameter.

classmethod GetOneErrorText(statuscode As %Status, index As %Integer, language As %String) as %String
Returns the error text for the error in the statuscode at position index.

To return the error text in a different language, pass a language code as the language parameter.

classmethod GetOneStatusText(statuscode As %Status, index As %Integer, language As %String) as %String
Returns the inner text for the error in the statuscode at position index,. without the error domain, id or source.

To return the error text in a different language, pass a language code as the language parameter.

classmethod IsError(statuscode As %Status) as %Boolean
Returns 1 if the statuscode contains errors. Otherwise, it returns 0.
classmethod IsOK(statuscode As %Status) as %Boolean
Returns 1 if the statuscode does not contain errors. Otherwise, it returns 0.
classmethod OK() as %Status
Returns the success status code.
classmethod StatusToSQLCODE(statuscode As %Status, Output message As %Library.String(MAXLEN=500), language) as %Integer
Return an SQLCODE equivalent to the statuscode. message contains the status text. Precise error code to SQLCODE value are only possible for SQLCODE errors - $$$SQLCode and $$$SQLError. All other error numbers translate to -400.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab