The Exceptions You Should Not Catch
public static void catchFooter(Throwable t) {
        if (t == null) return;
        Throwable t2 = unnest(t);
        if (t2 instanceof ConcurrentModificationException) {
            throw Threads.rethrowException(t2);
        if (t2 instanceof TimeoutException || t2 instanceof RejectedExecutionException || t2 instanceof Error)
            throw Threads.rethrowException(t2);
        if (t2 instanceof IllegalMonitorStateException)
            throw Threads.rethrowException(new InterruptedException(t2.toString()));
        // only reset an interrupt if this thread threw it.
        if (t2 instanceof InterruptedException && !(t instanceof ExecutionException))
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License