Package rx.exceptions

Class OnErrorNotImplementedException

All Implemented Interfaces:
Serializable

public class OnErrorNotImplementedException extends 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:
  • Field Details

  • Constructor Details

    • OnErrorNotImplementedException

      public OnErrorNotImplementedException(String message, 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(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