IRISLIB database
StatusException Class Reference

Class to hold Status style exceptions
If you wish to create one with New then the 4th argument is a $lb of data values to the error Status, e.g. More...

Inheritance diagram for StatusException:
Collaboration diagram for StatusException:

Public Member Functions

_.Library.String DisplayString (_.Library.Integer pLevel)
 This returns a string that represents the exception. More...
 
 SQLMessageString (_.Library.Integer pLevel)
 This returns a string that represents the SQL msg string. More...
 
- Public Member Functions inherited from AbstractException
_.Library.Integer AsSQLCODE ()
 Return the SQLCODE value corresponding to the exception.
 
_.Library.String AsSQLMessage ()
 Return the SQL msg string describing details of the exception.
 
_.Library.Status AsStatus ()
 Convert this exception to a Status compatible value.
 
_.Library.Status Log ()
 Call the log function (LOG^ETN) to log this exception. More...
 
 OutputToDevice (_.Library.Integer pLevel)
 This outputs the string representation of the exception to the current device, recursively. More...
 
 OutputToStream (_.Library.CharacterStream pStream, _.Library.Integer pLevel)
 This outputs the string representation of the exception to the supplied stream, recursively. More...
 
_.Library.Status StackAsArray (array)
 This method sets an array that is passed by reference to the execution stack at the time of the exception. More...
 

Static Public Member Functions

_.Exception.AbstractException CreateFromStatus (_.Library.Status pSC)
 Class to hold Status style exceptions
If you wish to create one with New then the 4th argument is a $lb of data values to the error Status, e.g. More...
 

Public Attributes

 NextException
 Container for additional exceptions in the Status value. More...
 
- Public Attributes inherited from CPPException
 Code
 Code is the error code. More...
 
 Data
 Data is extra information supplied for certain errors. More...
 
 InnerException
 This holds an Inner exception. More...
 
 Location
 Location is the location at which the error occurred. More...
 
 Name
 Name is the name of the error. More...
 

Private Member Functions

_.Library.Integer __OnAsSQLCODE ()
 Override this method to provide a custom conversion of an exception to an SQLCODE value.
 
_.Library.Status __OnAsStatus ()
 Override this method to provide a custom conversion of an exception to a status.
 

Detailed Description

Class to hold Status style exceptions
If you wish to create one with New then the 4th argument is a $lb of data values to the error Status, e.g.


Set exception=##class(Exception.StatusException).New(Name,Code,Location,$lb(arg1,arg2,arg3,arg4))

Member Function Documentation

◆ CreateFromStatus()

_.Exception.AbstractException CreateFromStatus ( _.Library.Status  pSC)
static

Class to hold Status style exceptions
If you wish to create one with New then the 4th argument is a $lb of data values to the error Status, e.g.


Set exception=##class(Exception.StatusException).New(Name,Code,Location,$lb(arg1,arg2,arg3,arg4))

Convert a Status into an exception

◆ DisplayString()

_.Library.String DisplayString ( _.Library.Integer  pLevel)

This returns a string that represents the exception.

Users should feel free

to modify the format in subclasses

Reimplemented from AbstractException.

◆ SQLMessageString()

SQLMessageString ( _.Library.Integer  pLevel)

This returns a string that represents the SQL msg string.

Users should feel free

to modify the format and content in subclasses DEPRECATED - use AsSQLMessage() instead. Override OnAsSQLMessage() to customize the value returned by AsSQLMessage().

Reimplemented from AbstractException.

Member Data Documentation

◆ NextException

NextException

Container for additional exceptions in the Status value.