Package 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`, `FBResultSetNotUpdatableException`

      public class FBSQLException
      extends java.sql.SQLException

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FBSQLException​(java.lang.Exception ex)` |
    `FBSQLException​(java.lang.String message)` |
    `FBSQLException​(java.lang.String message, java.lang.String sqlState)` |
    `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)`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | 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`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### FBSQLException

          public FBSQLException​(java.lang.Exception 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.