Throwable that an Observable might notify its subscribers of, but that then can
be handled by an operator that is designed to recover from or react appropriately to such an error. You can
recover more information from an OnErrorThrowable than is found in a typical Throwable, such
as the item the Observable was trying to emit at the time the error was encountered.
| Modifier and Type | Class and Description |
|---|---|
| public static class | OnErrorThrowable.OnNextValue
Represents an exception that was encountered while trying to emit an item from an Observable, and tries to preserve that item for future use and/or reporting. |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private static final long | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Throwable | Returns: the sameThrowable (e) that was passed in, with value added to it as a
causethe e, Object Throwable to which you want to add a causethe item you want to add to value)e as the cause of the ThrowableAdds the given item as the final cause of the given |
| public static OnErrorThrowable | Returns: anOnErrorThrowable representation of tthe t)Throwable to convert; if null, a NullPointerException is constructedConverts a |
| public Object | Returns: the value associated with thisOnErrorThrowable (or null if there is none)Get the value associated with this |
| public boolean | Returns: true if there is a value associated with this OnErrorThrowable, otherwise
falseIndicates whether or not there is a value associated with this |
| hasValue | back to summary |
|---|---|
| private final boolean hasValue | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| private final Object value | |
| OnErrorThrowable | back to summary |
|---|---|
| private OnErrorThrowable(Throwable exception) | |
| OnErrorThrowable | back to summary |
|---|---|
| private OnErrorThrowable(Throwable exception, Object value) | |
| addValueAsLastCause | back to summary |
|---|---|
| public static Throwable addValueAsLastCause(Throwable e, Object value) Adds the given item as the final cause of the given | |
| from | back to summary |
|---|---|
| public static OnErrorThrowable from(Throwable t) Converts a
| |
| getValue | back to summary |
|---|---|
| public Object getValue() Get the value associated with this
| |
| isValueNull | back to summary |
|---|---|
| public boolean isValueNull() Indicates whether or not there is a value associated with this
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| public | OnNextValue(Object
the item that the Observable was trying to emit at the time of the exception value)Create an |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: the item that the Observable was trying to emit at the time of the exceptionRetrieve the item that the Observable was trying to emit at the time this exception occurred. |
| pack-priv static String | Returns: a string version of the object if primitive or managed through error plugin, otherwise the class name of the objectthe item that the Observable was trying to emit at the time of the exception value)Render the object if it is a basic type. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| private final Object value | |
| OnNextValue | back to summary |
|---|---|
| public OnNextValue(Object value) Create an
| |
| getValue | back to summary |
|---|---|
| public Object getValue() Retrieve the item that the Observable was trying to emit at the time this exception occurred.
| |
| renderValue | back to summary |
|---|---|
| pack-priv static String renderValue(Object value) Render the object if it is a basic type. This avoids the library making potentially expensive
or calls to toString() which may throw exceptions.
If a specific behavior has been defined in the See PR #1401 and Issue #2468 for details. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final Set<Class<?>> INSTANCE | |
| Primitives | back to summary |
|---|---|
| pack-priv Primitives() | |
| create | back to summary |
|---|---|
| private static Set | |