# Class MariaDbSqlException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException

All Implemented Interfaces:
  `Serializable, Iterable<Throwable>`

public class MariaDbSqlException extends SQLException

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`MariaDbSqlException(String reason, String sql, String sqlState, int vendorCode, Throwable cause)`
`MariaDbSqlException(String reason, String sql, String sqlState, Throwable cause)`
`MariaDbSqlException(String reason, String sql, Throwable cause)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getDeadLockInfo()`
`String`
`getSql()`
`String`
`getThreadName()`
`static MariaDbSqlException`
`of(SQLException cause, String sql)`
`MariaDbSqlException`
`withDeadLockInfo(String deadLockInfo)`
`MariaDbSqlException`
`withThreadName(String threadName)`

### Methods inherited from class SQLException

`getErrorCode, getNextException, getSQLState, iterator, setNextException`

### Methods inherited from class Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class Object

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

### Methods inherited from interface Iterable

`forEach, spliterator`

## Constructor Details

### MariaDbSqlException

public MariaDbSqlException(String reason, String sql, Throwable cause)

### MariaDbSqlException

public MariaDbSqlException(String reason, String sql, String sqlState, Throwable cause)

### MariaDbSqlException

public MariaDbSqlException(String reason, String sql, String sqlState, int vendorCode, Throwable cause)

## Method Details

### of

public static MariaDbSqlException of(SQLException cause, String sql)

### withThreadName

public MariaDbSqlException withThreadName(String threadName)

### withDeadLockInfo

public MariaDbSqlException withDeadLockInfo(String deadLockInfo)

### getSql

public String getSql()

### getThreadName

public String getThreadName()

### getDeadLockInfo

public String getDeadLockInfo()