com.google.code.tempusfugit
Class ExceptionWrapper

java.lang.Object
  extended by com.google.code.tempusfugit.ExceptionWrapper

public class ExceptionWrapper
extends Object

Since:
1.1

Constructor Summary
ExceptionWrapper()
           
 
Method Summary
static void throwAsRuntimeException(Exception throwable)
           
static
<E extends RuntimeException>
void
throwException(Exception throwable, WithException<E> wrapper)
           
static
<V,E extends Exception>
V
wrapAnyException(Callable<V> callable, WithException<E> wrapper)
           
static
<V> V
wrapAsRuntimeException(Callable<V> callable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionWrapper

public ExceptionWrapper()
Method Detail

wrapAsRuntimeException

public static <V> V wrapAsRuntimeException(Callable<V> callable)
                                throws RuntimeException
Throws:
RuntimeException

wrapAnyException

public static <V,E extends Exception> V wrapAnyException(Callable<V> callable,
                                                         WithException<E> wrapper)
                          throws E extends Exception
Throws:
E extends Exception

throwAsRuntimeException

public static void throwAsRuntimeException(Exception throwable)
Since:
1.2

throwException

public static <E extends RuntimeException> void throwException(Exception throwable,
                                                               WithException<E> wrapper)
                           throws E extends RuntimeException
Throws:
E extends RuntimeException
Since:
1.2


Copyright © 2009-2012 tempus-fugit committers. All Rights Reserved.