com.ibatis.common.jdbc.exception
Class RuntimeSQLException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bycom.ibatis.common.jdbc.exception.RuntimeSQLException
All Implemented Interfaces:
java.io.Serializable

public class RuntimeSQLException
extends java.lang.RuntimeException

Unchecked exception to allow passing an Exception with the original SQLException

See Also:
Serialized Form

Constructor Summary
RuntimeSQLException()
          Default constructor
RuntimeSQLException(java.sql.SQLException sqlException)
          Constructor to pass along another exception
RuntimeSQLException(java.lang.String msg)
          Constructor to pass along a message
RuntimeSQLException(java.lang.String msg, java.sql.SQLException sqlException)
          Constructor to pass along a message and an exception
 
Method Summary
 int getErrorCode()
          Getter for the error code
 java.sql.SQLException getNextException()
          Get the next exception in the chain
 java.lang.String getSQLState()
          Getter for the SQL State
 void setNextException(java.sql.SQLException ex)
          Set the next exception in the chain
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuntimeSQLException

public RuntimeSQLException()
Default constructor


RuntimeSQLException

public RuntimeSQLException(java.lang.String msg)
Constructor to pass along a message

Parameters:
msg - - the message
See Also:
com.ibatis.common.exception.RuntimeException

RuntimeSQLException

public RuntimeSQLException(java.sql.SQLException sqlException)
Constructor to pass along another exception

Parameters:
sqlException - - the exception
See Also:
com.ibatis.common.exception.RuntimeException

RuntimeSQLException

public RuntimeSQLException(java.lang.String msg,
                           java.sql.SQLException sqlException)
Constructor to pass along a message and an exception

Parameters:
msg - - the message
sqlException - - the exception
See Also:
com.ibatis.common.exception.RuntimeException
Method Detail

getSQLState

public java.lang.String getSQLState()
Getter for the SQL State

Returns:
- the state

getErrorCode

public int getErrorCode()
Getter for the error code

Returns:
- the error code

getNextException

public java.sql.SQLException getNextException()
Get the next exception in the chain

Returns:
- the next exception

setNextException

public void setNextException(java.sql.SQLException ex)
Set the next exception in the chain

Parameters:
ex - - the next exception