Package org.h2.jdbc

# Class JdbcSQLNonTransientConnectionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLNonTransientException
java.sql.SQLNonTransientConnectionException
org.h2.jdbc.JdbcSQLNonTransientConnectionException

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

public final class JdbcSQLNonTransientConnectionException extends SQLNonTransientConnectionException implements JdbcException
Represents a database exception.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`JdbcSQLNonTransientConnectionException(String message, String sql, String state, int errorCode, Throwable cause, String stackTrace)`
Creates a SQLNonTransientConnectionException.

## Method Summary

Modifier and Type
Method
Description
`String`
`getMessage()`
`String`
`getOriginalMessage()`
INTERNAL
`String`
`getSQL()`
Returns the SQL statement.
`void`
`printStackTrace(PrintStream s)`
`void`
`printStackTrace(PrintWriter s)`
`void`
`setSQL(String sql)`
INTERNAL
`String`
`toString()`
Returns the class name, the message, and in the server mode, the stack trace of the server

### Methods inherited from class java.sql.SQLException

`getErrorCode, getNextException, getSQLState, iterator, setNextException`

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

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

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface org.h2.jdbc.JdbcException

`getErrorCode`

## Constructor Details

### JdbcSQLNonTransientConnectionException

public JdbcSQLNonTransientConnectionException(String message, String sql, String state, int errorCode, Throwable cause, String stackTrace)
Creates a SQLNonTransientConnectionException.

Parameters:
  `message` - the reason
  `sql` - the SQL statement
  `state` - the SQL state
  `errorCode` - the error code
  `cause` - the exception that was the reason for this exception
  `stackTrace` - the stack trace

## Method Details

### getMessage

public String getMessage()

Overrides:
  `getMessage` in class `Throwable`

### getOriginalMessage

public String getOriginalMessage()
Description copied from interface: `JdbcException`
INTERNAL

Specified by:
  `getOriginalMessage` in interface `JdbcException`
Returns:
  original message

### printStackTrace

public void printStackTrace(PrintWriter s)

Overrides:
  `printStackTrace` in class `Throwable`

### printStackTrace

public void printStackTrace(PrintStream s)

Overrides:
  `printStackTrace` in class `Throwable`

### getSQL

public String getSQL()
Description copied from interface: `JdbcException`
Returns the SQL statement.

SQL statements that contain '--hide--' are not listed.

Specified by:
  `getSQL` in interface `JdbcException`
Returns:
  the SQL statement

### setSQL

public void setSQL(String sql)
Description copied from interface: `JdbcException`
INTERNAL

Specified by:
  `setSQL` in interface `JdbcException`
Parameters:
  `sql` - to set

### toString

public String toString()
Description copied from interface: `JdbcException`
Returns the class name, the message, and in the server mode, the stack trace of the server

Specified by:
  `toString` in interface `JdbcException`
Overrides:
  `toString` in class `Throwable`
Returns:
  the string representation