Subscribe to Errors and Save Your App

Many Observables can emit error events, and there are operators available to preemptively catch and handle those errors or retry the operation. Also, there are drivers that guarantee not to terminate with an error event that can determine what to return in the event an error does occur ahead of time.

We did this earlier by simply returning an empty array. We will show some examples of using Driver, which is defined in RxCocoa.

In this chapter, we will learn the following:

  • Catching and handling errors
  • Error handling operators
  • Catch, retry, related terms, and concepts

Get Reactive Programming with Swift 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.