io.vertx.sqlclient

## Class DatabaseException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - io.vertx.core.VertxException
        - - io.vertx.sqlclient.DatabaseException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    DB2Exception, MSSQLException, MySQLException, PgException

      public abstract class DatabaseException
      extends VertxException

  Base class for database failures.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DatabaseException(String message, int errorCode, String sqlState)`
    `` | `DatabaseException(String message, int errorCode, String sqlState, SQLException cause)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getErrorCode()` Database specific error code.
    `String` | `getSqlState()` SQL State (XOPEN or SQL:2003 conventions).

    - ### 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`

- - ### Constructor Detail

    - #### DatabaseException

          protected DatabaseException(String message,
                                      int errorCode,
                                      String sqlState)

    - #### DatabaseException

          public DatabaseException(String message,
                                   int errorCode,
                                   String sqlState,
                                   SQLException cause)

  - ### Method Detail

    - #### getErrorCode

          public int getErrorCode()

      Database specific error code.
      Returns:
        the error code

    - #### getSqlState

          public String getSqlState()

      SQL State (XOPEN or SQL:2003 conventions).
      Returns:
        the SQL state if known or `null`

Copyright © 2023 Eclipse. All rights reserved.