org.h2.jdbc
Class JdbcSQLException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by org.h2.jdbc.JdbcSQLException
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<java.lang.Throwable>

public class JdbcSQLException
extends java.sql.SQLException

Represents a database exception.

See Also:
Serialized Form

Constructor Summary
JdbcSQLException(java.lang.String message, java.lang.String sql, java.lang.String state, int errorCode, java.lang.Throwable cause, java.lang.String stackTrace)
          Creates a SQLException a message, sqlstate and cause.
 
Method Summary
 java.lang.String getMessage()
          Get the detail error message.
 java.lang.Throwable getOriginalCause()
          INTERNAL
 java.lang.String getOriginalMessage()
          INTERNAL
 java.lang.Object getPayload()
          Get the error related payload object.
 java.lang.String getSQL()
          Returns the SQL statement.
 void printStackTrace()
          Prints the stack trace to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints the stack trace to the specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints the stack trace to the specified print writer.
 void setPayload(java.lang.Object payload)
          Set the error related payload object.
 void setSQL(java.lang.String sql)
          INTERNAL
 java.lang.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
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdbcSQLException

public JdbcSQLException(java.lang.String message,
                        java.lang.String sql,
                        java.lang.String state,
                        int errorCode,
                        java.lang.Throwable cause,
                        java.lang.String stackTrace)
Creates a SQLException a message, sqlstate and cause.

Parameters:
message - the reason
state - the SQL state
cause - the exception that was the reason for this exception
Method Detail

getMessage

public java.lang.String getMessage()
Get the detail error message.

Overrides:
getMessage in class java.lang.Throwable
Returns:
the message

getOriginalMessage

public java.lang.String getOriginalMessage()
INTERNAL


printStackTrace

public void printStackTrace()
Prints the stack trace to the standard error stream.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints the stack trace to the specified print writer.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the print writer

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints the stack trace to the specified print stream.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the print stream

getOriginalCause

public java.lang.Throwable getOriginalCause()
INTERNAL


getSQL

public java.lang.String getSQL()
Returns the SQL statement. SQL statements that contain '--hide--' are not listed.

Returns:
the SQL statement

setSQL

public void setSQL(java.lang.String sql)
INTERNAL


toString

public java.lang.String toString()
Returns the class name, the message, and in the server mode, the stack trace of the server

Overrides:
toString in class java.lang.Throwable
Returns:
the string representation

getPayload

public java.lang.Object getPayload()
Get the error related payload object.

Returns:
the payload

setPayload

public void setPayload(java.lang.Object payload)
Set the error related payload object.

Parameters:
payload - the new payload