Package org.h2.jdbc
Class JdbcSQLDataException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLNonTransientException
java.sql.SQLDataException
org.h2.jdbc.JdbcSQLDataException
- All Implemented Interfaces:
Serializable,Iterable<Throwable>,JdbcException
Represents a database exception.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTraceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.h2.jdbc.JdbcException
getErrorCode
-
Constructor Details
-
JdbcSQLDataException
public JdbcSQLDataException(String message, String sql, String state, int errorCode, Throwable cause, String stackTrace) Creates a SQLDataException.- 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
-