# SQLException

Represents a database exception.

Methods
| JdbcSQLException(String message, String sql, String state, int errorCode, Throwable cause, String stackTrace) Creates a SQLException.
| JdbcSQLException(String message, String sql, String state, int errorCode, Throwable cause, String stackTrace) Creates a SQLException. 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
String | getMessage() Get the detail error message.
String | getMessage() Get the detail error message. Returns: the message
String | getSQL() Returns the SQL statement.
String | getSQL() Returns the SQL statement. SQL statements that contain '--hide--' are not listed. Returns: the SQL statement
void | printStackTrace() Prints the stack trace to the standard error stream.
void | printStackTrace() Prints the stack trace to the standard error stream.
void | printStackTrace(PrintWriter s) Prints the stack trace to the specified print writer.
void | printStackTrace(PrintWriter s) Prints the stack trace to the specified print writer. Parameters: s - the print writer
void | printStackTrace(PrintStream s) Prints the stack trace to the specified print stream.
void | printStackTrace(PrintStream s) Prints the stack trace to the specified print stream. Parameters: s - the print stream
String | toString() Returns the class name, the message, and in the server mode, the stack trace of the server
String | toString() Returns the class name, the message, and in the server mode, the stack trace of the server Returns: the string representation

Fields
static String | HIDE_SQL = "--hide--"

#### HIDE_SQL = "--hide--"

If the SQL statement contains this text, then it is never added to the SQL exception. Hiding the SQL statement may be important if it contains a passwords, such as a CREATE LINKED TABLE statement.