com.caucho.sql
Class SQLExceptionWrapper

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by com.caucho.sql.SQLExceptionWrapper
All Implemented Interfaces:
ExceptionWrapper, java.io.Serializable, java.lang.Iterable<java.lang.Throwable>

public class SQLExceptionWrapper
extends java.sql.SQLException
implements ExceptionWrapper

Wraps an exception in a SQLException wrapper.

See Also:
Serialized Form

Constructor Summary
SQLExceptionWrapper(java.lang.String message)
          Creates the wrapper with a message.
SQLExceptionWrapper(java.lang.String message, java.lang.Throwable e)
          Creates the wrapper with a message and a root cause.
SQLExceptionWrapper(java.lang.Throwable e)
          Creates the wrapper with a root cause.
 
Method Summary
static java.sql.SQLException create(java.lang.Throwable e)
           
 java.lang.Throwable getCause()
          Returns the root cause.
 java.lang.Throwable getRootCause()
          Returns the root cause.
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, 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

SQLExceptionWrapper

public SQLExceptionWrapper(java.lang.String message)
Creates the wrapper with a message.


SQLExceptionWrapper

public SQLExceptionWrapper(java.lang.String message,
                           java.lang.Throwable e)
Creates the wrapper with a message and a root cause.

Parameters:
message - the message.
e - the rootCause exception

SQLExceptionWrapper

public SQLExceptionWrapper(java.lang.Throwable e)
Creates the wrapper with a root cause.

Parameters:
message - the message.
e - the rootCause exception
Method Detail

create

public static java.sql.SQLException create(java.lang.Throwable e)

getRootCause

public java.lang.Throwable getRootCause()
Returns the root cause.

Specified by:
getRootCause in interface ExceptionWrapper

getCause

public java.lang.Throwable getCause()
Returns the root cause.

Overrides:
getCause in class java.lang.Throwable