Package org.firebirdsql.gds
Class GDSException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- org.firebirdsql.gds.GDSException
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 - Direct Known Subclasses:
- GDSServerVersionException
 
 public class GDSException extends java.lang.ExceptionA GDS-specific exception- Author:
- David Jencks, Roman Rokytskyy
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description GDSException(int fbErrorCode)Create a new instance.GDSException(int type, int intParam)Create a new instance.GDSException(int type, int fbErrorCode, java.lang.String strParam)Construct instance of this class.GDSException(int type, int fbErrorCode, java.lang.String strParam, java.lang.Throwable cause)Construct instance of this class.GDSException(int type, java.lang.String strParam)Create a new instance.GDSException(int fbErrorCode, java.lang.Throwable cause)Create a new instance.GDSException(java.lang.String message)Create a new instance with only a simple message.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GDSExceptioncreateWithXAErrorCode(java.lang.String message, int xaErrorCode)Factory method to create a new instance with a givenXAerror code.intgetFbErrorCode()Get the Firebird-specific error code for this exception.intgetIntParam()Get theintparameter for this exception.java.lang.StringgetMessage()Returns a string representation of this exception.GDSExceptiongetNext()Get the next chained exception.java.lang.StringgetParam()Returns the parameter depending on the type of the error code.java.lang.StringgetSQLState()Get the SQL state of this exception.intgetXAErrorCode()Get the XaErrorCode value.booleanisWarning()Retrieve whether this exception is a warning.voidsetNext(GDSException e)Set the next exception in the chain.voidsetXAErrorCode(int xaErrorCode)Set the XaErrorCode value.
 
- 
- 
- 
Constructor Detail- 
GDSExceptionpublic GDSException(int type, int intParam)Create a new instance.- Parameters:
- type- type of the exception, should be always- ISCConstants.isc_arg_gds, otherwise no message will be displayed.
- intParam- Additional int parameter about the new exception
 
 - 
GDSExceptionpublic GDSException(int type, java.lang.String strParam)Create a new instance.- Parameters:
- type- type of the exception, should be always- ISCConstants.isc_arg_gds, otherwise no message will be displayed.
- strParam- value of the string parameter that will substitute- {0}entry in error message corresponding to the specified error code.
 
 - 
GDSExceptionpublic GDSException(int type, int fbErrorCode, java.lang.String strParam)Construct instance of this class. This method correctly constructs chain of exceptions for one string parameter.- Parameters:
- type- type of the exception, should be always- ISCConstants.isc_arg_gds, otherwise no message will be displayed.
- fbErrorCode- Firebird error code, one of the constants declared in- ISCConstants
- strParam- value of the string parameter that will substitute- {0}entry in error message corresponding to the specified error code.
 
 - 
GDSExceptionpublic GDSException(int type, int fbErrorCode, java.lang.String strParam, java.lang.Throwable cause)Construct instance of this class. This method correctly constructs chain of exceptions for one string parameter.- Parameters:
- type- type of the exception, should be always- ISCConstants.isc_arg_gds, otherwise no message will be displayed.
- fbErrorCode- Firebird error code, one of the constants declared in- ISCConstants
- strParam- value of the string parameter that will substitute- {0}entry in error message corresponding to the specified error code.
- cause- Cause of this exception
 
 - 
GDSExceptionpublic GDSException(int fbErrorCode) Create a new instance.- Parameters:
- fbErrorCode- Firebird error code, one of the constants declared in- ISCConstants
 
 - 
GDSExceptionpublic GDSException(int fbErrorCode, java.lang.Throwable cause)Create a new instance.- Parameters:
- fbErrorCode- Firebird error code, one of the constants declared in- ISCConstants
- cause- Cause of this exception
 
 - 
GDSExceptionpublic GDSException(java.lang.String message) Create a new instance with only a simple message.- Parameters:
- message- Message for the new exception
 
 
- 
 - 
Method Detail- 
createWithXAErrorCodepublic static GDSException createWithXAErrorCode(java.lang.String message, int xaErrorCode) Factory method to create a new instance with a givenXAerror code.- Parameters:
- message- Message for the new instance
- xaErrorCode- The- XAerror code
 
 - 
getFbErrorCodepublic int getFbErrorCode() Get the Firebird-specific error code for this exception.- Returns:
- The Firebird error code
 
 - 
getSQLStatepublic java.lang.String getSQLState() Get the SQL state of this exception.- Returns:
- the SQL state of this exception or nullif this object does not represent an error.
 
 - 
getIntParampublic int getIntParam() Get theintparameter for this exception.- Returns:
- The intparameter
 
 - 
getXAErrorCodepublic int getXAErrorCode() Get the XaErrorCode value.- Returns:
- the XaErrorCode value.
 
 - 
setXAErrorCodepublic void setXAErrorCode(int xaErrorCode) Set the XaErrorCode value.- Parameters:
- xaErrorCode- The new XaErrorCode value.
 
 - 
setNextpublic void setNext(GDSException e) Set the next exception in the chain.- Parameters:
- e- The next chained exception
 
 - 
getNextpublic GDSException getNext() Get the next chained exception.- Returns:
- The next chained exception
 
 - 
isWarningpublic boolean isWarning() Retrieve whether this exception is a warning.- Returns:
- trueif this is a warning,- falseotherwise
 
 - 
getMessagepublic java.lang.String getMessage() Returns a string representation of this exception.- Overrides:
- getMessagein class- java.lang.Throwable
 
 - 
getParampublic java.lang.String getParam() Returns the parameter depending on the type of the error code.
 
- 
 
-