org.firebirdsql.jdbc

## Class FBSQLException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.sql.SQLException
      - - org.firebirdsql.jdbc.FBSQLException

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Throwable>
  Direct Known Subclasses:
    FBDriverConsistencyCheckException, FBMissingParameterException, FBResultSetNotUpdatableException, TypeConversionException

      public class FBSQLException
      extends java.sql.SQLException

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `SQL_STATE_COMM_LINK_FAILURE` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_CONNECTION_CLOSED` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_CONNECTION_ERROR` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_CONNECTION_FAILURE` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_CONNECTION_FAILURE_IN_TX` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_GENERAL_ERROR` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_ARG_VALUE` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_COLUMN` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_CONN_ATTR` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_CONVERSION` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_OPTION_IDENTIFIER` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_PARAM_TYPE` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_STATEMENT_ID` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_INVALID_TX_STATE` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_NO_RESULT_SET` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_NO_ROW_AVAIL` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_SYNTAX_ERROR` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
    `static java.lang.String` | `SQL_STATE_WRONG_PARAM_NUM` Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FBSQLException(java.lang.Exception ex)`
    `FBSQLException(GDSException ex)`
    `FBSQLException(javax.resource.ResourceException ex)`
    `FBSQLException(java.lang.String message)`
    `FBSQLException(java.lang.String message, java.sql.SQLException ex)` Deprecated. In all most all cases use `FBSQLException(String, String)` in combination with `SQLException.setNextException(SQLException)`.
    `FBSQLException(java.lang.String message, java.lang.String sqlState)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `defaultSQLStateIfNull(java.lang.String sqlState)`
    `java.lang.Exception` | `getInternalException()` Deprecated. use `Throwable.getCause()` instead.

    - ### Methods inherited from class java.sql.SQLException

      `getErrorCode, getNextException, getSQLState, iterator, setNextException`

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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`

- - ### Field Detail

    - #### SQL_STATE_INVALID_CONN_ATTR

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_CONN_ATTR

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_NO_ROW_AVAIL

          @Deprecated
          public static final java.lang.String SQL_STATE_NO_ROW_AVAIL

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_GENERAL_ERROR

          @Deprecated
          public static final java.lang.String SQL_STATE_GENERAL_ERROR

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_INVALID_COLUMN

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_COLUMN

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_INVALID_ARG_VALUE

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_ARG_VALUE

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_INVALID_OPTION_IDENTIFIER

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_OPTION_IDENTIFIER

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_INVALID_PARAM_TYPE

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_PARAM_TYPE

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_WRONG_PARAM_NUM

          @Deprecated
          public static final java.lang.String SQL_STATE_WRONG_PARAM_NUM

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_NO_RESULT_SET

          @Deprecated
          public static final java.lang.String SQL_STATE_NO_RESULT_SET

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_INVALID_CONVERSION

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_CONVERSION

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_INVALID_TX_STATE

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_TX_STATE

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_INVALID_STATEMENT_ID

          @Deprecated
          public static final java.lang.String SQL_STATE_INVALID_STATEMENT_ID

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_CONNECTION_ERROR

          @Deprecated
          public static final java.lang.String SQL_STATE_CONNECTION_ERROR

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_CONNECTION_CLOSED

          @Deprecated
          public static final java.lang.String SQL_STATE_CONNECTION_CLOSED

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_CONNECTION_FAILURE

          @Deprecated
          public static final java.lang.String SQL_STATE_CONNECTION_FAILURE

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_CONNECTION_FAILURE_IN_TX

          @Deprecated
          public static final java.lang.String SQL_STATE_CONNECTION_FAILURE_IN_TX

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_COMM_LINK_FAILURE

          @Deprecated
          public static final java.lang.String SQL_STATE_COMM_LINK_FAILURE

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

    - #### SQL_STATE_SYNTAX_ERROR

          @Deprecated
          public static final java.lang.String SQL_STATE_SYNTAX_ERROR

      Deprecated. Use constants from `SQLStateConstants`. To be removed in Jaybird 4.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FBSQLException

          public FBSQLException(java.lang.Exception ex)

    - #### FBSQLException

          public FBSQLException(GDSException ex)

    - #### FBSQLException

          public FBSQLException(javax.resource.ResourceException ex)

    - #### FBSQLException

          public FBSQLException(java.lang.String message)

    - #### FBSQLException

          @Deprecated
          public FBSQLException(java.lang.String message,
                                   java.sql.SQLException ex)

      Deprecated. In all most all cases use `FBSQLException(String, String)` in combination with `SQLException.setNextException(SQLException)`.
      Parameters:
        `message` - Exception message
        `ex` - SQLException that should be set as the 'next exception'

    - #### FBSQLException

          public FBSQLException(java.lang.String message,
                        java.lang.String sqlState)

      Parameters:
        `message` - Exception message
        `sqlState` - SQL State for this exception. Replaced with `SQLStateConstants.SQL_STATE_GENERAL_ERROR` if null

  - ### Method Detail

    - #### getInternalException

          @Deprecated
          public java.lang.Exception getInternalException()

      Deprecated. use `Throwable.getCause()` instead.

    - #### defaultSQLStateIfNull

          public static java.lang.String defaultSQLStateIfNull(java.lang.String sqlState)

      Parameters:
        `sqlState` - SQL State value (or null)
      Returns:
        The passed sqlState or `SQLStateConstants.SQL_STATE_GENERAL_ERROR` if sqlState is null.

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.