| Modifier and Type | Field and Description |
|---|---|
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static Throwable | Returns: the lastThrowable in the causality-chain of e (or a "Stack too deep to get
final cause" RuntimeException if the chain is too long to traverse)the e)Throwable whose final cause you are curious aboutGet the |
| public static RuntimeException | Returns: becausepropagate itself throws an exception or error, this is a sort of phantom return
value; propagate does not actually return anythingthe exception to throw directly or wrapped t)Convenience method to throw a |
| public static void | throwIfAny(List<? extends Throwable>
the collection of exceptions. If null or empty, no exception is thrown.
If the collection contains a single exception, that exception is either thrown as-is or wrapped into a
CompositeException. Multiple exceptions are wrapped into a CompositeException. exceptions)Throws a single or multiple exceptions contained in the collection, wrapping it into
|
| public static void | throwIfFatal(Throwable
the t)Throwable to test and perhaps throwThrows a particular |
| public static void | throwOrReport(Throwable
the exception t, Observer<?> the observer to report to o, Object the value that caused the exception value)Forwards a fatal exception or reports it along with the value caused it to the given Observer. |
| public static void | throwOrReport(Throwable
the exception t, SingleSubscriber<?> the observer to report to o, Object the value that caused the exception value)Forwards a fatal exception or reports it along with the value caused it to the given SingleSubscriber. |
| public static void | throwOrReport(Throwable
the exception t, Observer<?> the observer to report to o)Forwards a fatal exception or reports it to the given Observer. |
| public static void | throwOrReport(Throwable
the exception. throwable, SingleSubscriber<?> the subscriber to report to. subscriber)Forwards a fatal exception or reports it to the given Observer. |
| MAX_DEPTH | back to summary |
|---|---|
| private static final int MAX_DEPTH | |
| Exceptions | back to summary |
|---|---|
| private Exceptions() Utility class, no instances. | |
| addCause | back to summary |
|---|---|
| public static void addCause(Throwable e, Throwable cause) Adds a | |
| getFinalCause | back to summary |
|---|---|
| public static Throwable getFinalCause(Throwable e) Get the | |
| propagate | back to summary |
|---|---|
| public static RuntimeException propagate(Throwable t) Convenience method to throw a
| |
| throwIfAny | back to summary |
|---|---|
| public static void throwIfAny(List<? extends Throwable> exceptions) Throws a single or multiple exceptions contained in the collection, wrapping it into
| |
| throwIfFatal | back to summary |
|---|---|
| public static void throwIfFatal(Throwable t) Throws a particular
onError methods, but only
if the errors are not so catastrophic that such a call would be futile, in which case you simply want to
rethrow the error.
| |
| throwOrReport | back to summary |
|---|---|
| public static void throwOrReport(Throwable t, Observer<?> o, Object value) Forwards a fatal exception or reports it along with the value caused it to the given Observer. | |
| throwOrReport | back to summary |
|---|---|
| public static void throwOrReport(Throwable t, SingleSubscriber<?> o, Object value) Forwards a fatal exception or reports it along with the value caused it to the given SingleSubscriber.
| |
| throwOrReport | back to summary |
|---|---|
| public static void throwOrReport(Throwable t, Observer<?> o) Forwards a fatal exception or reports it to the given Observer. | |
| throwOrReport | back to summary |
|---|---|
| public static void throwOrReport(Throwable throwable, SingleSubscriber<?> subscriber) Forwards a fatal exception or reports it to the given Observer.
| |