public class ExceptionUtil
extends java.lang.Object
Constructor and Description |
---|
ExceptionUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.RuntimeException |
convertToRuntimeException(java.lang.Throwable e) |
static void |
retainInterruptFlag(java.lang.Throwable catchedException)
This sets the interrupt flag if the catched exception was an
InterruptedException . |
static void |
rethrowInterruptedException(java.lang.Throwable e) |
public static java.lang.RuntimeException convertToRuntimeException(java.lang.Throwable e)
public static void retainInterruptFlag(java.lang.Throwable catchedException)
InterruptedException
. Catching such an
exception always clears the interrupt flag.catchedException
- The catched exception.public static void rethrowInterruptedException(java.lang.Throwable e) throws java.lang.InterruptedException
java.lang.InterruptedException