Fault Tolerance Basics


Elixir in Action: Chapter 8

A walk through run-time errors and Supervisors.

Three types of run-time errors:

  • errors: invalid data operation, missing function, unknown pattern match, or raise your own.
  • exits: deliberately terminate a process.
  • throw: to catch up the call stack.

The result of a a try/catch/after block is always from either the try or catch clause, never the after clause.

Processes can be linked and monitored.

Notable Notes and Quotes

  • “Instead of obsessively trying to reduce the number of errors, your priority should be to minimize their effects and recover from them automatically.”
  • (throw) for control flow is hacky and somewhat reminiscent of goto, and you should avoid this technique as much as possible.”

My Github repository. Book samples Github code samples.

Quotes are excerpts From Elixir in Action, Third Edition, Sasa Juric. All notes and comments are my own opinion. Follow me at @rgacote@genserver.social