| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final Throwable | TERMINATED
A singleton instance of a Throwable indicating a terminal state for exceptions, don't leak this. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static NullPointerException | Returns: the composed Stringthe prefix to add to the message. prefix)Creates a NullPointerException with a composed message via |
| public static List | |
| public static < the value type T> T | Returns: the valuethe value to check value, String the prefix to the error message prefix)Similar to Objects.requireNonNull but composes the error message via
|
| public static String | Returns: the composed Stringthe prefix to add to the message. prefix)Composes a String with a null warning message. |
| public static Throwable | |
| public static < the generic exception type E extends Throwable> Exception | Returns: the Throwable e if it is a subclass of Exceptionthe Throwable error to return or throw e)Workaround for Java 6 not supporting throwing a final Throwable from a catch block. |
| public static String | |
| public static RuntimeException | Returns: the (wrapped) errorthe error to wrap or throw error)If the provided Throwable is an Error this method throws it, otherwise returns a RuntimeException wrapping the error if that error is a checked exception. |
| TERMINATED | back to summary |
|---|---|
| public static final Throwable TERMINATED A singleton instance of a Throwable indicating a terminal state for exceptions, don't leak this. | |
| ExceptionHelper | back to summary |
|---|---|
| private ExceptionHelper() Utility class. | |
| addThrowable | back to summary |
|---|---|
| public static boolean addThrowable(AtomicReference<Throwable> field, Throwable exception) | |
| createNullPointerException | back to summary |
|---|---|
| public static NullPointerException createNullPointerException(String prefix) Creates a NullPointerException with a composed message via
| |
| flatten | back to summary |
|---|---|
| public static List Returns a flattened list of Throwables from tree-like CompositeException chain. | |
| nullCheck | back to summary |
|---|---|
| public static <T> T nullCheck(T value, String prefix) Similar to Objects.requireNonNull but composes the error message via
| |
| nullWarning | back to summary |
|---|---|
| public static String nullWarning(String prefix) Composes a String with a null warning message. | |
| terminate | back to summary |
|---|---|
| public static Throwable terminate(AtomicReference<Throwable> field) | |
| throwIfThrowable | back to summary |
|---|---|
| public static <E extends Throwable> Exception throwIfThrowable(Throwable e) throws Throwable-:E Workaround for Java 6 not supporting throwing a final Throwable from a catch block.
| |
| timeoutMessage | back to summary |
|---|---|
| public static String timeoutMessage(long timeout, TimeUnit unit) | |
| wrapOrThrow | back to summary |
|---|---|
| public static RuntimeException wrapOrThrow(Throwable error) If the provided Throwable is an Error this method throws it, otherwise returns a RuntimeException wrapping the error if that error is a checked exception.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | fillInStackTrace()
Overrides java. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Termination | back to summary |
|---|---|
| pack-priv Termination() | |
| fillInStackTrace | back to summary |
|---|---|
| public Throwable fillInStackTrace() Overrides java. Doc from java. Fills in the execution stack trace. This method records within this
If the stack trace of this | |