@SuppressWarnings("unchecked")
    private static <T extends Throwable> void throwUncheckedImpl(Throwable t) throws T {
        throw (T)t;
    }
Allows treating checked exceptions as unchecked.
Usage:
throw throwUnchecked(e);
The reason for the return type is to allow writing throw at the call site
instead of just calling throwUnchecked. Just calling throwUnchecked
means that the java compiler won't know that the statement will throw an exception,
and will therefore complain on things such e.g. missing return value.
vespajlib/src/main/java/com/yahoo/yolean/Exceptions.java