Exceptions can occur almost anywhere in the chain of the Observable operators, and we already know about the onError event that is communicated down the Observable chain to the Observer. After that, the subscription terminates and no more emissions occur.
But sometimes, we want to intercept exceptions before they get to the Observer and attempt some form of recovery. We can also pretend that the error never happened and expect to continue processing the emissions.
However, a more productive approach to error handling would be to attempt resubscribing or switch to an alternate source Observable. And if you find that none of the error recovery operators meet your needs, the chances are you can compose one yourself.
For demonstration examples, let's divide 10 by each emitted integer value, where one of the values is 0. This will result in a / by zero...