Package 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
,OracleException
,PgException
public abstract class DatabaseException extends VertxException
Base class for database failures.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor 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 Description int
getErrorCode()
Database specific error code.String
getSqlState()
SQL State (XOPEN or SQL:2003 conventions).-
Methods inherited from class io.vertx.core.VertxException
noStackTrace, noStackTrace, noStackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
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
-
-