com.ibatis.common.jdbc.exception

Class RuntimeSQLException

public class RuntimeSQLException extends RuntimeException

Unchecked exception to allow passing an Exception with the original SQLException
Constructor Summary
RuntimeSQLException()
Default constructor
RuntimeSQLException(String msg)
Constructor to pass along a message
RuntimeSQLException(SQLException sqlException)
Constructor to pass along another exception
RuntimeSQLException(String msg, SQLException sqlException)
Constructor to pass along a message and an exception
Method Summary
intgetErrorCode()
Getter for the error code
SQLExceptiongetNextException()
Get the next exception in the chain
StringgetSQLState()
Getter for the SQL State
voidsetNextException(SQLException ex)
Set the next exception in the chain

Constructor Detail

RuntimeSQLException

public RuntimeSQLException()
Default constructor

RuntimeSQLException

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

Parameters: msg - the message

RuntimeSQLException

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

Parameters: sqlException - the exception

RuntimeSQLException

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

Parameters: msg - the message sqlException - the exception

Method Detail

getErrorCode

public int getErrorCode()
Getter for the error code

Returns: - the error code

getNextException

public SQLException getNextException()
Get the next exception in the chain

Returns: - the next exception

getSQLState

public String getSQLState()
Getter for the SQL State

Returns: - the state

setNextException

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

Parameters: ex - the next exception

Copyright © 2011. All Rights Reserved.