/** * If any cause in the given exception chain is an APIAuthenticationException, rethrow that * * @param thrown */ public static void rethrowAPIAuthenticationException(Throwable thrown) { rethrowIfCause(thrown, APIAuthenticationException.class); }
ExceptionUtil.rethrowIfCause(ex, NullPointerException.class); ExceptionUtil.rethrowIfCause(ex, IllegalArgumentException.class); ExceptionUtil.rethrowIfCause(ex, IllegalStateException.class);