IRISLIB database
Status Class Reference

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

Inheritance diagram for Status:
Collaboration diagram for Status:

Static Public Member Functions

_.Library.Status AppendStatus (_.Library.Status statuscode1, _.Library.Status statuscode2)
 This is a helper class that is used to construct and display/decompose status codes. More...
 
_.Library.Status DecomposeStatus (_.Library.Status statuscode, errorlist, _.Library.String qspec, _.Library.String language)
 Returns the error text and error information for statuscode;. More...
 
_.Library.Status DisplayError (_.Library.Status statuscode)
 Display the error text for statuscode.
 
_.Library.Boolean Equals (_.Library.Status statuscode, statusids)
 Return true if the domain/msgid of statuscode equals any of the following error code domain/msgid arguments.
 
_.Library.Status Error (_.Library.Integer errorcode, _.Library.String message1, _.Library.String message2, _.Library.String message3)
 Return an error status code with the error as specified by the errorcode. More...
 
_.Library.String GetErrorCodes (_.Library.Status statuscode)
 Returns the error codes for statuscode as a comma-delimited list.
 
_.Library.String GetErrorText (_.Library.Status statuscode, _.Library.String language)
 Returns the error text for statuscode. More...
 
_.Library.String GetOneErrorText (_.Library.Status statuscode, _.Library.Integer index, _.Library.String language)
 Returns the error text for the error in the statuscode at position index. More...
 
_.Library.String GetOneStatusText (_.Library.Status statuscode, _.Library.Integer index, _.Library.String language)
 Returns the inner text for the error in the statuscode at position index,. More...
 
_.Library.Boolean IsError (_.Library.Status statuscode)
 Returns 1 if the statuscode contains errors. More...
 
_.Library.Boolean IsOK (_.Library.Status statuscode)
 Returns 1 if the statuscode does not contain errors. More...
 
_.Library.Status OK ()
 Returns the success status code.
 
_.Library.Integer StatusToSQLCODE (_.Library.Status statuscode, _.Library.String message, language)
 Return an SQLCODE equivalent to the statuscode. More...
 
- Static Public Member Functions inherited from Help
_.Library.String Help (_.Library.String method)
 This is a helper class that is used by the various SYSTEM classes to provide a Help method. More...
 

Detailed Description

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.

Member Function Documentation

◆ AppendStatus()

_.Library.Status AppendStatus ( _.Library.Status  statuscode1,
_.Library.Status  statuscode2 
)
static

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.

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.

◆ DecomposeStatus()

_.Library.Status DecomposeStatus ( _.Library.Status  statuscode,
  errorlist,
_.Library.String  qspec,
_.Library.String  language 
)
static

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.

◆ Error()

_.Library.Status Error ( _.Library.Integer  errorcode,
_.Library.String  message1,
_.Library.String  message2,
_.Library.String  message3 
)
static

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.

◆ GetErrorText()

_.Library.String GetErrorText ( _.Library.Status  statuscode,
_.Library.String  language 
)
static

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.

◆ GetOneErrorText()

_.Library.String GetOneErrorText ( _.Library.Status  statuscode,
_.Library.Integer  index,
_.Library.String  language 
)
static

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.

◆ GetOneStatusText()

_.Library.String GetOneStatusText ( _.Library.Status  statuscode,
_.Library.Integer  index,
_.Library.String  language 
)
static

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.

◆ IsError()

_.Library.Boolean IsError ( _.Library.Status  statuscode)
static

Returns 1 if the statuscode contains errors.

Otherwise, it returns 0.

◆ IsOK()

_.Library.Boolean IsOK ( _.Library.Status  statuscode)
static

Returns 1 if the statuscode does not contain errors.

Otherwise, it returns 0.

◆ StatusToSQLCODE()

_.Library.Integer StatusToSQLCODE ( _.Library.Status  statuscode,
_.Library.String  message,
  language 
)
static

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.