Class JdbcSQLException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
org.h2.jdbc.JdbcSQLException
- All Implemented Interfaces:
Serializable, Iterable<Throwable>, JdbcException
Represents a database exception.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTraceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface JdbcException
getErrorCode
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
originalMessage
-
stackTrace
-
message
-
sql
-
-
Constructor Details
-
JdbcSQLException
public JdbcSQLException(String message, String sql, String state, int errorCode, Throwable cause, String stackTrace) Creates a SQLException.- Parameters:
message- the reasonsql- the SQL statementstate- the SQL stateerrorCode- the error codecause- the exception that was the reason for this exceptionstackTrace- the stack trace
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-
getOriginalMessage
Description copied from interface:JdbcExceptionINTERNAL- Specified by:
getOriginalMessagein interfaceJdbcException- Returns:
- original message
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
getSQL
Description copied from interface:JdbcExceptionReturns the SQL statement.SQL statements that contain '--hide--' are not listed.
- Specified by:
getSQLin interfaceJdbcException- Returns:
- the SQL statement
-
setSQL
Description copied from interface:JdbcExceptionINTERNAL- Specified by:
setSQLin interfaceJdbcException- Parameters:
sql- to set
-
toString
Description copied from interface:JdbcExceptionReturns the class name, the message, and in the server mode, the stack trace of the server- Specified by:
toStringin interfaceJdbcException- Overrides:
toStringin classThrowable- Returns:
- the string representation
-