src/main/java/io/reactivex/internal/util/ExceptionHelper.java
@SuppressWarnings("unchecked")
    public static <E extends Throwable> Exception throwIfThrowable(Throwable e) throws E {
        if (e instanceof Exception) {
            return (Exception)e;
        }
        throw (E)e;
    }
@SuppressWarnings("unchecked")
    public static <E extends Throwable> Exception throwIfThrowable(Throwable e) throws E {
        if (e instanceof Exception) {
            return (Exception)e;
        }
        throw (E)e;
    }
Workaround for Java 6 not supporting throwing a final Throwable from a catch block.
@param <E> the generic exception type
@param e the Throwable error to return or throw
@return the Throwable e if it is a subclass of Exception
@throws E the generic exception thrown