O'Reilly logo

Reactive Programming With Java 9 by Tejaswini Mandar Jog

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

Handling specific undeliverable exceptions

We just used the setErrorHandler() method to provide a handler for the undeliverable exceptions. The thing to consider is that we caught all the undeliverable exceptions under the same hood. Only the cause will provide us with the information as to whether they represent a bug in the code or whether it is due to some network state. Depending upon the cause, the developers can take the decision of whether to treat them seriously or whether to ignore them. Now the question is, how to manage a typical undeliverable exception?

A very simple mechanism is to check the expected exceptions in the error handler and then take corrective measures. Let's take an example--in a code written by us we are expecting ...

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