Package com.ibatis.common.jdbc.exception
Class RuntimeSQLException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ibatis.common.jdbc.exception.RuntimeSQLException
- All Implemented Interfaces:
Serializable
Unchecked exception to allow passing an Exception with the original SQLException.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Constructor to pass along a message.RuntimeSQLException
(String msg, SQLException sqlException) Constructor to pass along a message and an exception.RuntimeSQLException
(SQLException sqlException) Constructor to pass along another exception. -
Method Summary
Modifier and TypeMethodDescriptionint
Getter for the error code.Get the next exception in the chain.Getter for the SQL State.void
Set the next exception in the chain.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RuntimeSQLException
public RuntimeSQLException()Default constructor. -
RuntimeSQLException
Constructor to pass along a message.- Parameters:
msg
- - the message
-
RuntimeSQLException
Constructor to pass along another exception.- Parameters:
sqlException
- - the exception
-
RuntimeSQLException
Constructor to pass along a message and an exception.- Parameters:
msg
- - the messagesqlException
- - the exception
-
-
Method Details
-
getSQLState
-
getErrorCode
public int getErrorCode()Getter for the error code.- Returns:
- - the error code
-
getNextException
Get the next exception in the chain.- Returns:
- - the next exception
-
setNextException
Set the next exception in the chain.- Parameters:
ex
- - the next exception
-