|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mariadb.jdbc.internal.util.exceptions.ExceptionMapper
public class ExceptionMapper
Constructor Summary | |
---|---|
ExceptionMapper()
|
Method Summary | |
---|---|
static SQLException |
getException(SQLException exception,
MariaDbConnection connection,
MariaDbStatement statement,
boolean timeout)
Helper to decorate exception with associate subclass of SQLException exception. |
static SQLException |
getFeatureNotSupportedException(String message)
|
static SQLException |
getSqlException(String message)
|
static SQLException |
getSqlException(String message,
Exception exception)
|
static SQLException |
getSqlException(String message,
String sqlState,
Exception exception)
|
static String |
mapCodeToSqlState(int code)
Mapp code to State. |
static void |
throwAndLogException(SQLException exception,
MariaDbConnection connection,
MariaDbStatement statement,
Logger logger,
boolean timeout)
Helper to throw exception. |
static void |
throwException(SQLException exception,
MariaDbConnection connection,
MariaDbStatement statement)
Helper to throw exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExceptionMapper()
Method Detail |
---|
public static void throwAndLogException(SQLException exception, MariaDbConnection connection, MariaDbStatement statement, Logger logger, boolean timeout) throws SQLException
exception
- exceptionconnection
- current connectionstatement
- current statementlogger
- loggertimeout
- was timeout on query
SQLException
- exceptionpublic static void throwException(SQLException exception, MariaDbConnection connection, MariaDbStatement statement) throws SQLException
exception
- exceptionconnection
- current connectionstatement
- current statement
SQLException
- exceptionpublic static SQLException getException(SQLException exception, MariaDbConnection connection, MariaDbStatement statement, boolean timeout)
SQLException
exception.
exception
- exceptionconnection
- current connectionstatement
- current statementtimeout
- was timeout on query
public static SQLException getSqlException(String message, Exception exception)
public static SQLException getSqlException(String message, String sqlState, Exception exception)
public static SQLException getSqlException(String message)
public static SQLException getFeatureNotSupportedException(String message)
public static String mapCodeToSqlState(int code)
code
- code
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |