to.etc.util
Class WrappedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
to.etc.util.WrappedException
- All Implemented Interfaces:
- java.io.Serializable
public class WrappedException
- extends java.lang.RuntimeException
Helper class for managing the checked exception idiocy rampant
in Java code. It wraps checked exceptions in unchecked ones, and
has a method to unwrap them again at a higher level.
- Author:
- Frits Jalvingh
Created on Nov 25, 2010
- See Also:
- Serialized Form
Method Summary |
static java.lang.Exception |
unwrap(java.lang.Exception x)
|
static java.lang.RuntimeException |
wrap(java.lang.Exception x)
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, 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 |
WrappedException
public WrappedException(java.lang.String message,
java.lang.Throwable cause)
WrappedException
public WrappedException(java.lang.Throwable cause)
wrap
public static java.lang.RuntimeException wrap(java.lang.Exception x)
unwrap
public static java.lang.Exception unwrap(java.lang.Exception x)