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 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.