O'Reilly logo

The Little Elixir & OTP Guidebook by Benjamin Tan Wei Hao

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

Chapter 5. Concurrent error-handling and fault tolerance with links, monitors, and processes

This chapter covers

  • Handling errors, Elixir style
  • Links, monitors, and trapping exits
  • Implementing a supervisor

Ever watched The Terminator, the movie about an assassin cyborg from the future (played by Arnold Schwarzenegger)? Even when the Terminator is shot multiple times, it just keeps coming back unfazed, over and over again. Once you’re acquainted with Elixir’s fault-tolerance features, you’ll be able to build programs that can handle errors gracefully and take corrective actions to fix the problems. (You won’t be able to build Skynet, though—at least, not yet.)

In sequential programs, there’s typically only one main process doing all the ...

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