public class ExceptionMapper extends Object
Constructor and Description |
---|
ExceptionMapper() |
Modifier and Type | Method and Description |
---|---|
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(QueryException exception,
MariaDbConnection connection,
MariaDbStatement statement,
Logger logger)
Helper to throw exception.
|
static void |
throwException(QueryException exception,
MariaDbConnection connection,
MariaDbStatement statement)
Helper to throw exception.
|
public static void throwAndLogException(QueryException exception, MariaDbConnection connection, MariaDbStatement statement, Logger logger) throws SQLException
exception
- exceptionconnection
- current connectionstatement
- current statementlogger
- loggerSQLException
- exceptionpublic static void throwException(QueryException exception, MariaDbConnection connection, MariaDbStatement statement) throws SQLException
exception
- exceptionconnection
- current connectionstatement
- current statementSQLException
- exceptionpublic 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
- codeCopyright © 2016. All rights reserved.