O'Reilly logo

Hands-On Reactive Programming with Reactor by Rahul Sharma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating errors

Before we try to handle errors, let's first try to raise a few. In Java ecosystems, error conditions are raised by throwing exceptions. Exceptions can be raised under the following conditions:

  • The producer can throw an exception while generating the next value.
  • The subscriber can throw an exception while processing the next value or subscription event, or in any operators.

In all of the preceding conditions, there must be an effective procedure for handling the error raised. Reactive Streams prescribe the error event for the same purpose. The specification states that a producer should raise an error event, instead of throwing an exception. However, the specification does not discuss exceptions raised while processing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required