...

/

Treating Errors as Data

Treating Errors as Data

Let’s learn how to use errors as data to assist us in handling failure.

Common errors

Functional programs are simpler when we can use pipelines to simplify code. Transforming data is one of the fundamental tenets of Elixir. However, specific problems can arise.

Exceptions

Functions that fail often raise exceptions. When we don’t handle errors, they transition to code execution in the form of exceptions. ...