org.mariadb.jdbc.internal.util

## Class ExceptionMapper

- java.lang.Object
- - org.mariadb.jdbc.internal.util.ExceptionMapper

    public class ExceptionMapper
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`ExceptionMapper()`

### Method Summary

All Methods Static Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ExceptionMapper

    public ExceptionMapper()

### Method Detail

#### throwAndLogException

    public static void throwAndLogException(QueryException exception,
                                            MariaDbConnection connection,
                                            MariaDbStatement statement,
                                            Logger logger)
                                     throws SQLException

Helper to throw exception. Exception is logged.

Parameters:
  `exception` - exception
  `connection` - current connection
  `statement` - current statement
  `logger` - logger
Throws:
  `SQLException` - exception

#### throwException

    public static void throwException(QueryException exception,
                                      MariaDbConnection connection,
                                      MariaDbStatement statement)
                               throws SQLException

Helper to throw exception.

Parameters:
  `exception` - exception
  `connection` - current connection
  `statement` - current statement
Throws:
  `SQLException` - exception

#### getSqlException

    public static SQLException getSqlException(String message,
                                               Exception exception)

#### getSqlException

    public static SQLException getSqlException(String message,
                                               String sqlState,
                                               Exception exception)

#### getSqlException

    public static SQLException getSqlException(String message)

#### getFeatureNotSupportedException

    public static SQLException getFeatureNotSupportedException(String message)

#### mapCodeToSqlState

    public static String mapCodeToSqlState(int code)

Mapp code to State.

Parameters:
  `code` - code
Returns:
  String