ExceptionUtils.java :  » Database-Persistance » objectdinner » info » gamlor » icoodb » web » utils » Android Open Source

Android Open Source » Database Persistance » objectdinner 
objectdinner » info » gamlor » icoodb » web » utils » ExceptionUtils.java
package info.gamlor.icoodb.web.utils;

/**
 * @author roman.stoffel@gamlor.info
 * @since 03.08.2010
 */
public class ExceptionUtils { 
    private ExceptionUtils(){}

    public static <TException extends Throwable,TReturnValue> TReturnValue reThrow(TException exception){
        return ExceptionUtils.<RuntimeException,TReturnValue>reThrowInternal(exception);
    }

    private static <TException extends Throwable,TReturnValue> TReturnValue reThrowInternal(Throwable exception) throws TException {
        throw (TException) exception;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.