public class ExceptionMapper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ExceptionMapper.SqlStates |
Constructor and Description |
---|
ExceptionMapper() |
Modifier and Type | Method and Description |
---|---|
static SQLException |
createException(QueryException exception,
MariaDbConnection connection,
Statement statement)
Helper to create exception from queryException.
|
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 |
throwException(QueryException exception,
MariaDbConnection connection,
Statement statement)
Helper to throw exception.
|
public static void throwException(QueryException exception, MariaDbConnection connection, Statement statement) throws SQLException
exception
- exceptionconnection
- current connectionstatement
- current statementSQLException
- exceptionpublic static SQLException createException(QueryException exception, MariaDbConnection connection, Statement statement)
exception
- exceptionconnection
- current connectionstatement
- current statementpublic 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.