org.firebirdsql.gds
Class GDSException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.firebirdsql.gds.GDSException
All Implemented Interfaces:
java.io.Serializable

public class GDSException
extends java.lang.Exception

Author:
David Jencks, Roman Rokytskyy
See Also:
Serialized Form

Field Summary
protected  int intParam
           
protected  GDSException next
          My child
protected  java.lang.String strParam
           
protected  int type
           
protected  int xaErrorCode
          The variable xaErrorCode is used to allow the same code to be used for transaction control from the XAResource, LocalTransaction, and Connection.
 
Constructor Summary
GDSException(int fbErrorCode)
           
GDSException(int type, int intParam)
           
GDSException(int type, int fbErrorCode, java.lang.String strParam)
          Construct instance of this class.
GDSException(int type, java.lang.String strParam)
           
GDSException(java.lang.String message)
           
 
Method Summary
static GDSException createWithXAErrorCode(java.lang.String message, int xaErrorCode)
           
 int getFbErrorCode()
           
 int getIntParam()
           
 java.lang.String getMessage()
          Returns a string representation of this exception.
 GDSException getNext()
           
protected  java.lang.String getParam()
          Returns the parameter depending on the type of the error code.
 int getXAErrorCode()
          Get the XaErrorCode value.
 boolean isFatal()
           
 boolean isWarning()
           
 void setNext(GDSException e)
           
 void setXAErrorCode(int xaErrorCode)
          Set the XaErrorCode value.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected int type

intParam

protected int intParam

strParam

protected java.lang.String strParam

xaErrorCode

protected int xaErrorCode
The variable xaErrorCode is used to allow the same code to be used for transaction control from the XAResource, LocalTransaction, and Connection. This code may be added to the GDSException without obscuring the message: only at the final level is the GDSException converted to the spec-required exception.


next

protected GDSException next
My child

Constructor Detail

GDSException

public GDSException(int type,
                    int intParam)

GDSException

public GDSException(int type,
                    java.lang.String strParam)

GDSException

public 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 GDS interface.
strParam - value of the string parameter that will substitute {0} entry in error message corresponding to the specified error code.

GDSException

public GDSException(int fbErrorCode)

GDSException

public GDSException(java.lang.String message)
Method Detail

createWithXAErrorCode

public static GDSException createWithXAErrorCode(java.lang.String message,
                                                 int xaErrorCode)

getFbErrorCode

public int getFbErrorCode()

getIntParam

public int getIntParam()

getXAErrorCode

public int getXAErrorCode()
Get the XaErrorCode value.

Returns:
the XaErrorCode value.

setXAErrorCode

public void setXAErrorCode(int xaErrorCode)
Set the XaErrorCode value.

Parameters:
xaErrorCode - The new XaErrorCode value.

setNext

public void setNext(GDSException e)

getNext

public GDSException getNext()

isWarning

public boolean isWarning()

getMessage

public java.lang.String getMessage()
Returns a string representation of this exception.


isFatal

public boolean isFatal()

getParam

protected java.lang.String getParam()
Returns the parameter depending on the type of the error code.



Copyright © 2001 David Jencks and other authors. All rights reserved.