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:
Serializable
- Enclosing class:
OnErrorThrowable
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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOnNextValue
(Object value) Create anOnNextValue
exception 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
Modifier and TypeMethodDescriptiongetValue()
Retrieve the item that the Observable was trying to emit at the time this exception occurred.(package private) static String
renderValue
(Object value) Render the object if it is a basic type.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
value
-
-
Constructor Details
-
OnNextValue
Create anOnNextValue
exception 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 Details
-
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
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 theRxJavaErrorHandler
plugin, 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
-