5.1.4 Status Values and Exception Codes

A status value can be used as a return value from a procedure call to indicate success, failure, and/or other information about the requested operation. A status value can also be used as an exception code to indicate the reason that an exception is being raised.

A status value is represented as shown in Figure 5-1.

Figure 5-1   Status Value Representation

3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1  
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0  
+---+-+-------------------------+-------------------------------+  
|Sev|C|       Facility          |               Code            |  
+---+-+-------------------------+-------------------------------+  

The components of this representation are as follows:

Sev  

A severity code, which can hold the following bit-encoded values:

C  

A flag that indicates that this status value is customer defined.

Facility  

A facility code that indicates the software component that defines this status value.

Code  

An identifier value for a particular status condition.