public class UncheckedInterruptedException extends UncheckedGrinderException
InterruptedExceptions and InterruptedIOExceptions
easier to propagate.
Our policy on interrupt handling:
Thread.interrupt() and ThreadGroup.interrupt() are used
in shut down code. We can't simply swallow InterruptedExceptions.
InterruptedException which it
doesn't know how to handle, it rethrows it in an
UncheckedInterruptedException.InterruptibleRunnable.interruptibleRun()
implementations are carefully reviewed to ensure that they do not ignore the
interrupt condition and will exit whenever InterruptedException and
InterruptedIOExceptions are received. We only interrupt code that
implements
InterruptibleRunnable.interruptibleRun().
UncheckedInterruptedExceptions.InterruptibleRunnable catches an
IOException, it calls ioException(IOException), which will
throw an UncheckedInterruptedException if necessary.InterruptedExceptions. This doesn't
matter as we should never interrupt this code.| Constructor and Description |
|---|
UncheckedInterruptedException(InterruptedException e)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
ioException(IOException e)
InterruptedIOExceptions are a pain to handle as they extend
IOException. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic UncheckedInterruptedException(InterruptedException e)
e - The original InterruptedException.public static void ioException(IOException e)
InterruptedIOExceptions are a pain to handle as they extend
IOException. IOException handlers should call this, unless
they are part of an InterruptibleRunnable
and know what they're doing.e - An IOException.Copyright © 2000-2014. All Rights Reserved.