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

  Deprecated.
  use a normal SQLException or subclass, this class may be removed in Jaybird 7 or later

      @Deprecated
      public class GDSException
      extends java.lang.Exception

  A GDS-specific exception
  Author:
    David Jencks, Roman Rokytskyy
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GDSException(int fbErrorCode)` Deprecated. Create a new instance.
    `GDSException(int type, int intParam)` Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
    `GDSException(int type, int fbErrorCode, java.lang.String strParam)` Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
    `GDSException(int type, int fbErrorCode, java.lang.String strParam, java.lang.Throwable cause)` Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
    `GDSException(int type, java.lang.String strParam)` Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
    `GDSException(int fbErrorCode, java.lang.Throwable cause)` Deprecated. Create a new instance.
    `GDSException(java.lang.String message)` Deprecated. Create a new instance with only a simple message.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GDSException` | `createWithXAErrorCode(java.lang.String message, int xaErrorCode)` Deprecated. will be removed in Jaybird 6 without replacement
    `int` | `getFbErrorCode()` Deprecated. will be removed in Jaybird 6 without replacement
    `int` | `getIntParam()` Deprecated. will be removed in Jaybird 6 without replacement
    `java.lang.String` | `getMessage()` Deprecated. Returns a string representation of this exception.
    `GDSException` | `getNext()` Deprecated. will be removed in Jaybird 6 without replacement
    `java.lang.String` | `getParam()` Deprecated. will be removed in Jaybird 6 without replacement
    `java.lang.String` | `getSQLState()` Deprecated. will be removed in Jaybird 6, but replaced by `SQLException.getSQLState()`
    `int` | `getXAErrorCode()` Deprecated. will be removed in Jaybird 6 without replacement
    `boolean` | `isWarning()` Deprecated. will be removed in Jaybird 6 without replacement
    `void` | `setNext(GDSException e)` Deprecated. will be removed in Jaybird 6 without replacement
    `void` | `setXAErrorCode(int xaErrorCode)` Deprecated. will be removed in Jaybird 6 without replacement

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### GDSException

          @Deprecated
          public GDSException(int type,
                                           int intParam)

      Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
      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

    - #### GDSException

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

      Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
      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.

    - #### GDSException

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

      Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
      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.

    - #### GDSException

          @Deprecated
          public GDSException(int type,
                                           int fbErrorCode,
                                           java.lang.String strParam,
                                           java.lang.Throwable cause)

      Deprecated. will be removed in Jaybird 6, if you really must use this class, use `GDSException(String)`, `GDSException(int)`, or `GDSException(int,Throwable)`, but keep in mind this class will be removed in Jaybird 7 or later
      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

    - #### GDSException

          public GDSException(int fbErrorCode)

      Deprecated.
      Create a new instance.
      Parameters:
        `fbErrorCode` - Firebird error code, one of the constants declared in `ISCConstants`

    - #### GDSException

          public GDSException(int fbErrorCode,
                              java.lang.Throwable cause)

      Deprecated.
      Create a new instance.
      Parameters:
        `fbErrorCode` - Firebird error code, one of the constants declared in `ISCConstants`
        `cause` - Cause of this exception

    - #### GDSException

          public GDSException(java.lang.String message)

      Deprecated.
      Create a new instance with only a simple message.
      Parameters:
        `message` - Message for the new exception

  - ### Method Detail

    - #### createWithXAErrorCode

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

      Deprecated. will be removed in Jaybird 6 without replacement
      Factory method to create a new instance with a given `XA` error code.
      Parameters:
        `message` - Message for the new instance
        `xaErrorCode` - The `XA` error code

    - #### getFbErrorCode

          @Deprecated
          public int getFbErrorCode()

      Deprecated. will be removed in Jaybird 6 without replacement
      Get the Firebird-specific error code for this exception.
      Returns:
        The Firebird error code

    - #### getSQLState

          @Deprecated
          public java.lang.String getSQLState()

      Deprecated. will be removed in Jaybird 6, but replaced by `SQLException.getSQLState()`
      Get the SQL state of this exception.
      Returns:
        the SQL state of this exception or `null` if this object does not represent an error.

    - #### getIntParam

          @Deprecated
          public int getIntParam()

      Deprecated. will be removed in Jaybird 6 without replacement
      Get the `int` parameter for this exception.
      Returns:
        The `int` parameter

    - #### getXAErrorCode

          @Deprecated
          public int getXAErrorCode()

      Deprecated. will be removed in Jaybird 6 without replacement
      Get the XaErrorCode value.
      Returns:
        the XaErrorCode value.

    - #### setXAErrorCode

          @Deprecated
          public void setXAErrorCode(int xaErrorCode)

      Deprecated. will be removed in Jaybird 6 without replacement
      Set the XaErrorCode value.
      Parameters:
        `xaErrorCode` - The new XaErrorCode value.

    - #### setNext

          @Deprecated
          public void setNext(GDSException e)

      Deprecated. will be removed in Jaybird 6 without replacement
      Set the next exception in the chain.
      Parameters:
        `e` - The next chained exception

    - #### getNext

          @Deprecated
          public GDSException getNext()

      Deprecated. will be removed in Jaybird 6 without replacement
      Get the next chained exception.
      Returns:
        The next chained exception

    - #### isWarning

          @Deprecated
          public boolean isWarning()

      Deprecated. will be removed in Jaybird 6 without replacement
      Retrieve whether this exception is a warning.
      Returns:
        `true` if this is a warning, `false` otherwise

    - #### getMessage

          public java.lang.String getMessage()

      Deprecated.
      Returns a string representation of this exception.
      Overrides:
        `getMessage` in class `java.lang.Throwable`

    - #### getParam

          @Deprecated
          public java.lang.String getParam()

      Deprecated. will be removed in Jaybird 6 without replacement
      Returns the parameter depending on the type of the error code.

Copyright © 2001-2025 Jaybird (Firebird JDBC) team. All rights reserved.