Semantically:
-
A
throwis meant to be caught by you (typically within the same module that throws), can be any term -
An
erroris when something goes wrong (typically not rescued), it is an exception in Elixir -
An
exitis when a process is crashing (typically not caught), can be any term
throws are handled by catchs, errors are handled by rescues. If I had a magic wand, exit would not be part of the language, especially because it is often mixed with the separate exit signal, but it exists in Erlang, so we have to support it, hence the catch kind, reason -> notation.
PRs to improve the docs are always welcome.






















