Class Reference
InterSystems: The power behind what matters   
Documentation  Search
 

abstract class %SYSTEM.Status extends Help

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

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
14


Summary

Methods
AppendStatus DecomposeStatus DisplayError EmbedStatus
Equals Error GetErrorCodes GetErrorText
GetOneErrorText GetOneStatusText Help IsError
IsOK OK StatusToSQLCODE


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, language) as %Status
Returns the error text and error information for statuscode. The information is returned through the errorlist parameter. If the qspec parameter contains "d" flag, then the error text is also displayed to the screen. The user can also specify the language in which the error text is returned using 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 in a comma delimited list.
• classmethod GetErrorText(statuscode As %Status, language) 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>. The user can also specify the language in which the error text is returned using language parameter.
• classmethod GetOneErrorText(statuscode As %Status, index As %Integer, language) as %Boolean
Returns the error text for the error in the statuscode at position index. The user can also specify the language in which the error text is returned using language parameter.
• classmethod GetOneStatusText(statuscode As %Status, index As %Integer, language) as %Boolean
Returns the inner text for the error in the statuscode at position index,. without the error domain,id or source. The user can also specify the language in which the error text is returned using 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.


Copyright © 1997-2017, InterSystems Corporation