lp.util
Class ExceptionAdapter
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
lp.util.ExceptionAdapter
- All Implemented Interfaces:
- Serializable
public class ExceptionAdapter
- extends RuntimeException
A RuntimeException
container for checked exceptions. Should be used
fake the checked exception mechanism in Java. See
this article
for some arguments why this could be a good idea ;o)
- Version:
- 1.0.0
- Author:
- Martin Slota
- See Also:
- Serialized Form
Constructor Summary |
ExceptionAdapter(Exception cause)
Creates a new instance of ExceptionAdapter that stores
cause as its cause. |
Method Summary |
void |
rethrow()
Rethrows the original exception. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
ExceptionAdapter
public ExceptionAdapter(Exception cause)
- Creates a new instance of
ExceptionAdapter
that stores
cause
as its cause.
- Parameters:
cause
- the exception to wrap
rethrow
public void rethrow()
throws Exception
- Rethrows the original exception.
- Throws:
Exception
- the original exception