Package rx.exceptions

Class OnErrorNotImplementedException

  • All Implemented Interfaces:
    java.io.Serializable

    public class OnErrorNotImplementedException
    extends java.lang.RuntimeException
    Represents an exception used to re-throw Observer.onError(Throwable) when an implementation doesn't exist.

    Rx Design Guidelines 5.2:

    "when calling the Subscribe method that only has an onNext argument, the OnError behavior will be to rethrow the exception on the thread that the message comes out from the observable sequence. The OnCompleted behavior in this case is to do nothing."

    See Also:
    RxJava issue #198, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      OnErrorNotImplementedException​(java.lang.String message, java.lang.Throwable e)
      Customizes the Throwable with a custom message and wraps it before it is to be re-thrown as an OnErrorNotImplementedException.
      OnErrorNotImplementedException​(java.lang.Throwable e)
      Wraps the Throwable before it is to be re-thrown as an OnErrorNotImplementedException.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OnErrorNotImplementedException

        public OnErrorNotImplementedException​(java.lang.String message,
                                              java.lang.Throwable e)
        Customizes the Throwable with a custom message and wraps it before it is to be re-thrown as an OnErrorNotImplementedException.
        Parameters:
        message - the message to assign to the Throwable to re-throw
        e - the Throwable to re-throw; if null, a NullPointerException is constructed
      • OnErrorNotImplementedException

        public OnErrorNotImplementedException​(java.lang.Throwable e)
        Wraps the Throwable before it is to be re-thrown as an OnErrorNotImplementedException.
        Parameters:
        e - the Throwable to re-throw; if null, a NullPointerException is constructed