com.ibatis.common.exception
Class NestedRuntimeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bycom.ibatis.common.exception.NestedRuntimeException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DaoException, ProbeException, RuntimeSQLException, SqlMapException

public class NestedRuntimeException
extends java.lang.RuntimeException

Nexted exception implementation. Thanks Claus.

See Also:
Serialized Form

Constructor Summary
NestedRuntimeException()
          Constructor
NestedRuntimeException(java.lang.String msg)
          Constructor
NestedRuntimeException(java.lang.String msg, java.lang.Throwable cause)
          Constructor
NestedRuntimeException(java.lang.Throwable cause)
          Constructor
 
Method Summary
 java.lang.Throwable getCause()
          Gets the causing exception, if any.
 void printStackTrace()
          Sends a stack trace to System.err (including the root cause, if any)
 void printStackTrace(java.io.PrintStream ps)
          Sends a stack trace to the PrintStream passed in (including the root cause, if any)
 void printStackTrace(java.io.PrintWriter pw)
          Sends a stack trace to the PrintWriter passed in (including the root cause, if any)
 java.lang.String toString()
          Converts the exception to a string representation
 
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

NestedRuntimeException

public NestedRuntimeException()
Constructor


NestedRuntimeException

public NestedRuntimeException(java.lang.String msg)
Constructor

Parameters:
msg - error message

NestedRuntimeException

public NestedRuntimeException(java.lang.Throwable cause)
Constructor

Parameters:
cause - the nested exception (caused by)

NestedRuntimeException

public NestedRuntimeException(java.lang.String msg,
                              java.lang.Throwable cause)
Constructor

Parameters:
msg - error message
cause - the nested exception (caused by)
Method Detail

getCause

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

Returns:
The cause of the exception

toString

public java.lang.String toString()
Converts the exception to a string representation

Returns:
The string representation of the exception

printStackTrace

public void printStackTrace()
Sends a stack trace to System.err (including the root cause, if any)


printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Sends a stack trace to the PrintStream passed in (including the root cause, if any)

Parameters:
ps - - the PrintStream to send the output to

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Sends a stack trace to the PrintWriter passed in (including the root cause, if any)

Parameters:
pw - - the PrintWriter to send the output to