Package rx.exceptions
Class OnErrorThrowable.OnNextValue
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- rx.exceptions.OnErrorThrowable.OnNextValue
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- OnErrorThrowable
public static class OnErrorThrowable.OnNextValue extends java.lang.RuntimeExceptionRepresents 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.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classOnErrorThrowable.OnNextValue.Primitives
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDprivate java.lang.Objectvalue
-
Constructor Summary
Constructors Constructor Description OnNextValue(java.lang.Object value)Create anOnNextValueexception and include in its error message a string representation of the item that was intended to be emitted at the time the exception was handled.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetValue()Retrieve the item that the Observable was trying to emit at the time this exception occurred.(package private) static java.lang.StringrenderValue(java.lang.Object value)Render the object if it is a basic type.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
value
private final java.lang.Object value
-
-
Constructor Detail
-
OnNextValue
public OnNextValue(java.lang.Object value)
Create anOnNextValueexception and include in its error message a string representation of the item that was intended to be emitted at the time the exception was handled.- Parameters:
value- the item that the Observable was trying to emit at the time of the exception
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
Retrieve the item that the Observable was trying to emit at the time this exception occurred.- Returns:
- the item that the Observable was trying to emit at the time of the exception
-
renderValue
static java.lang.String renderValue(java.lang.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 theRxJavaErrorHandlerplugin, some types may also have a specific rendering. Non-primitive types not managed by the plugin are rendered as the classname of the object.See PR #1401 and Issue #2468 for details.
- Parameters:
value- the item that the Observable was trying to emit at the time of the exception- Returns:
- a string version of the object if primitive or managed through error plugin, otherwise the classname of the object
-
-