org.idoox.security.util
Class RuntimeWrappedException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.idoox.security.util.RuntimeWrappedException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
WSSecurityException

public class RuntimeWrappedException
extends java.lang.RuntimeException

This exception is able to contain another exception inside. It overrides useful methods such as printStackTrace to show stack trace of exception inside.

Since:
3.0
See Also:
Serialized Form
Component:
Security-Core

Constructor Summary
RuntimeWrappedException()
          creates an exception
RuntimeWrappedException(java.lang.String message)
          creates an exception
RuntimeWrappedException(java.lang.String message, java.lang.Throwable reason)
          creates an exception
RuntimeWrappedException(java.lang.Throwable reason)
          creates an exception
 
Method Summary
 java.lang.Throwable getException()
          accesses the wrapped exception
 java.lang.Throwable getRootException()
          returns the originally wrapped exception in a sequence of wrappers.
 void printStackTrace()
          prints stack trace to stderr
 void printStackTrace(java.io.PrintStream p)
          prints stack trace
 void printStackTrace(java.io.PrintWriter p)
          prints stack trace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuntimeWrappedException

public RuntimeWrappedException()
creates an exception


RuntimeWrappedException

public RuntimeWrappedException(java.lang.String message)
creates an exception

Parameters:
message - the message

RuntimeWrappedException

public RuntimeWrappedException(java.lang.String message,
                               java.lang.Throwable reason)
creates an exception

Parameters:
message - the message
reason - the wrapped exception

RuntimeWrappedException

public RuntimeWrappedException(java.lang.Throwable reason)
creates an exception

Parameters:
reason - the wrapped exception
Method Detail

printStackTrace

public void printStackTrace()
prints stack trace to stderr


printStackTrace

public void printStackTrace(java.io.PrintStream p)
prints stack trace

Parameters:
p - the print stream where the error will be printed to

printStackTrace

public void printStackTrace(java.io.PrintWriter p)
prints stack trace

Parameters:
p - the print writer where the error will be printed to

getException

public java.lang.Throwable getException()
accesses the wrapped exception

Returns:
the wrapped exception

getRootException

public java.lang.Throwable getRootException()
returns the originally wrapped exception in a sequence of wrappers.

Returns:
reason that is not an instance of WrappedException or null if such a reason has not been found.