org.makumba.commons
Class WrappedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.makumba.commons.WrappedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LogicException

public class WrappedException
extends Exception

Wraps an exception to throw it further as a desired exception type. stacktraces of this exception will actually print the stracktrace of the wrapped exception.

Version:
$Id: WrappedException.java 5149 2010-05-18 19:00:47Z rosso_nero $
Author:
Cristian Bogdan, Manuel Gay
See Also:
Serialized Form

Field Summary
(package private)  Throwable t
           
 
Constructor Summary
WrappedException()
          wrap nothing
WrappedException(String s, boolean isControllerOriginated)
          wrap nothing, store a message
WrappedException(Throwable e, boolean isControllerOriginated)
          wrap the given exception
WrappedException(Throwable e, String s)
          wrap the given exception
 
Method Summary
 Throwable getReason()
          return the wrapped exception
 boolean isControllerOriginated()
          checks whether this exception originated in Controller or at the JSP level
 void printStackTrace()
          print the stacktrace of the wrapped exception
 void printStackTrace(PrintStream ps)
          print the stacktrace of the wrapped exception
 void printStackTrace(PrintWriter ps)
          print the stacktrace of the wrapped exception
 String toString()
          the class name of this exception, then the toString of the wrapped
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

t

Throwable t
Constructor Detail

WrappedException

public WrappedException(Throwable e,
                        boolean isControllerOriginated)
wrap the given exception


WrappedException

public WrappedException(Throwable e,
                        String s)
wrap the given exception


WrappedException

public WrappedException()
wrap nothing


WrappedException

public WrappedException(String s,
                        boolean isControllerOriginated)
wrap nothing, store a message

Method Detail

getReason

public Throwable getReason()
return the wrapped exception


isControllerOriginated

public boolean isControllerOriginated()
checks whether this exception originated in Controller or at the JSP level


printStackTrace

public void printStackTrace()
print the stacktrace of the wrapped exception

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintStream ps)
print the stacktrace of the wrapped exception

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter ps)
print the stacktrace of the wrapped exception

Overrides:
printStackTrace in class Throwable

toString

public String toString()
the class name of this exception, then the toString of the wrapped

Overrides:
toString in class Throwable