com.ibatis.common.jdbc.exception
Class NestedSQLException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.sql.SQLException
              extended bycom.ibatis.common.jdbc.exception.NestedSQLException
All Implemented Interfaces:
java.io.Serializable

public class NestedSQLException
extends java.sql.SQLException

Class to allow passing an Exception with the original SQLException

See Also:
Serialized Form

Constructor Summary
NestedSQLException(java.lang.String msg)
          Constructor from java.sql.SQLException
NestedSQLException(java.lang.String reason, java.lang.String SQLState)
          Constructor from java.sql.SQLException
NestedSQLException(java.lang.String reason, java.lang.String SQLState, int vendorCode)
          Constructor from java.sql.SQLException
NestedSQLException(java.lang.String reason, java.lang.String SQLState, int vendorCode, java.lang.Throwable cause)
          Constructor from java.sql.SQLException with added nested exception
NestedSQLException(java.lang.String reason, java.lang.String SQLState, java.lang.Throwable cause)
          Constructor from java.sql.SQLException with added nested exception
NestedSQLException(java.lang.String msg, java.lang.Throwable cause)
          Constructor from java.sql.SQLException with added nested exception
NestedSQLException(java.lang.Throwable cause)
          Constructor from java.sql.SQLException with added nested exception
 
Method Summary
 java.lang.Throwable getCause()
          Gets the causing exception, if any.
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream ps)
           
 void printStackTrace(java.io.PrintWriter pw)
           
 java.lang.String toString()
           
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedSQLException

public NestedSQLException(java.lang.String msg)
Constructor from java.sql.SQLException

Parameters:
msg - - the message for the exception
See Also:
SQLException

NestedSQLException

public NestedSQLException(java.lang.String reason,
                          java.lang.String SQLState)
Constructor from java.sql.SQLException

Parameters:
reason - - the reason for the exception
SQLState - - the SQLState
See Also:
SQLException

NestedSQLException

public NestedSQLException(java.lang.String reason,
                          java.lang.String SQLState,
                          int vendorCode)
Constructor from java.sql.SQLException

Parameters:
reason - - the reason for the exception
SQLState - - the SQLState
vendorCode - - a vendor supplied code to go w/ the message
See Also:
SQLException

NestedSQLException

public NestedSQLException(java.lang.String msg,
                          java.lang.Throwable cause)
Constructor from java.sql.SQLException with added nested exception

Parameters:
msg - - the message for the exception
cause - - the cause of the exception

NestedSQLException

public NestedSQLException(java.lang.String reason,
                          java.lang.String SQLState,
                          java.lang.Throwable cause)
Constructor from java.sql.SQLException with added nested exception

Parameters:
reason - - the reason for the exception
SQLState - - the SQLState
cause - - the cause of the exception
See Also:
SQLException

NestedSQLException

public NestedSQLException(java.lang.String reason,
                          java.lang.String SQLState,
                          int vendorCode,
                          java.lang.Throwable cause)
Constructor from java.sql.SQLException with added nested exception

Parameters:
reason - - the reason for the exception
SQLState - - the SQLState
vendorCode - - a vendor supplied code to go w/ the message
cause - - the cause of the exception

NestedSQLException

public NestedSQLException(java.lang.Throwable cause)
Constructor from java.sql.SQLException with added nested exception

Parameters:
cause - - the cause of the exception
Method Detail

getCause

public java.lang.Throwable getCause()
Gets the causing exception, if any.


toString

public java.lang.String toString()

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream ps)

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)