| java.lang.Object java.lang.Throwable java.lang.Exception org.axiondb.AxionException
All known Subclasses: org.axiondb.ConstraintViolationException, org.axiondb.TransactionConflictException,
AxionException | public class AxionException extends Exception (Code) | | Root exception for Axion related or specific problems. This exception provides access
to Axion-specific SQL Vendor codes. Where possible they are mapped to SQL99 / XOPEN 99
SQL state codes.
SQLState codes consisti of 5 characters. The first 2 characters specify the error
class, the last three characters specify the subclass. For example, the SQLSTATE value
'22012' consists of class code 22 (data exception) and subclass code 012 (division by
zero). * Each of the five characters in a SQLSTATE value is a digit (0..9) or an
uppercase Latin letter (A..Z).
Class codes that begin with a digit in the range 0..4 or a letter in the range A..H are
reserved for predefined conditions. Within predefined classes, subclass codes that
begin with a digit in the range 0..4 or a letter in the range A..H are reserved for
predefined sub-conditions. All other subclass codes are reserved for
implementation-defined sub-conditions. (see ANSI-SQL99 specification).
See Also: org.axiondb.util.ExceptionConverter version: $Revision: 1.9 $ $Date: 2005/04/07 19:32:00 $ author: Rodney Waldhoff |
Constructor Summary | |
public | AxionException() Equivalent to
AxionException.AxionException(java.lang.String,java.lang.Throwable) AxionException(null,null,DEFAULT_VENDOR_CODE) . | public | AxionException(int vendorcode) Equivalent to
AxionException.AxionException(java.lang.String,java.lang.Throwable,int) AxionException(null,null,vendorcode) . | public | AxionException(String message) Equivalent to
AxionException.AxionException(java.lang.String,java.lang.Throwable,int) AxionException(message,null,DEFAULT_VENDOR_CODE) . | public | AxionException(String message, int vendorcode) Equivalent to
AxionException.AxionException(java.lang.String,java.lang.Throwable,int) AxionException(message,null,vendorcode) . | public | AxionException(String message, Throwable nested, int vendorcode) Construct a new
AxionException with the given message , wrapping the
given
Throwable . | public | AxionException(String message, Throwable nested) Equivalent to
AxionException.AxionException(java.lang.String,java.lang.Throwable) AxionException(message,nested,DEFAULT_VENDOR_CODE) . | public | AxionException(Throwable nested) Equivalent to
AxionException.AxionException(java.lang.String,java.lang.Throwable) AxionException(null,nested,DEFAULT_VENDOR_CODE) . | public | AxionException(Throwable nested, int vendorcode) Equivalent to
AxionException.AxionException(java.lang.String,java.lang.Throwable) AxionException(null,nested,vendorcode) . |
DEFAULT_VENDOR_CODE | final public static int DEFAULT_VENDOR_CODE(Code) | | |
AxionException | public AxionException(String message, Throwable nested, int vendorcode)(Code) | | Construct a new
AxionException with the given message , wrapping the
given
Throwable .
Parameters: message - my detailed message (possibly null ) Parameters: nested - a Throwableto wrap (possibly null ) Parameters: vendorcode - an error code |
getMessage | public String getMessage()(Code) | | Returns the detail message string of this AxionException
|
getSQLState | public String getSQLState()(Code) | | Returns the five-digit SQL State code (as defined in the ANSI-SQL 99 standard). The
translation works as follows:
-- any vendor code lower than 100000 is just converted to a String.
-- vendor codes 10000 and over use the following rules: a) first digit
indicates the position of a non-digit character.
1: Second Class Digit is Alphanumeric (e.g. SQL StateCode "0Z001")
2: Last Subclass Digit is Alphanumeric (e.g. "2200E")
3: Second Class Digit and Last Subclass Digit are alphanumeric
4: Other case (e.g. for class HZ) --> explicit conversion value (must be
assigned directly in code) b) Alpha Character is translated into its position in
the Alphabet (e.g. H=08; Z=26) etc. thus 1026001 is translated into 0Z001 32080001
would be translated into 2H00A
|
getVendorCode | public int getVendorCode()(Code) | | Returns the Axion-specific vendor code for this exception
|
|
|