Chapter 12. Errors and Processes

In most languages, exceptions are managed from within the execution flow of the program, the way we’ve done it with try ... catch in previous examples. The problem with this very common approach is that your regular code needs to handle outstanding errors on every level, or you just delegate the burden of making things safe to the layer above it until you end up having the eternal top-level try ... catch, which catches everything but doesn’t know anything about it. It’s more complex than that in the real world, but that’s generally what it looks like. Erlang supports this model too, as you’ve already seen.

However, Erlang also supports a different level of exception handling that allows you to move the handling ...

Get Learn You Some Erlang for Great Good! now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.