Erlang Error Messages

When a run-time error occurs,
that is an exception of class error,
the exit reason is a tuple {Reason,Stack}.
Reason is a term indicating the type of error:

Exit Reasons.
Reason Type of error
badarg Argument is of wrong type.

badarith

Argument is of wrong type in an arithmetic expression.

{badmatch,V}

Evaluation of a match expression failed.
The value V did not match.
function_clause

No matching function clause is found when evaluating a
function call.
{case_clause,V} No matching branch is found when evaluating a case
expression. The value V did not match.

if_clause

No true branch is found when evaluating an if
expression.
{try_clause,V} No matching branch is found when evaluating the
of-section of a a try
expression. The value V did not match.
undef The function cannot be found when evaluating a function
call.
{badfun,F} There is something wrong with a fun F.
{badarity,F} A fun is applied to the wrong number of arguments.
F describes the fun and the arguments.
timeout_value The timeout value in a receive..after expression is
evaluated to something else than an integer or
infinity.
noproc Trying to link to a non-existing process.
{nocatch,V} Trying to evaluate a throw outside a catch.
V is the throw term.

system_limit A system limit has been reached. See Efficiency Guide for
information about system limits.

Stack is the stack of function calls being evaluated
when the error occurred, given as a list of tuples
{Module,Name,Arity} with the most recent function call
first. The most recent function call tuple may in some
cases be {Module,Name,[Arg]}.

One Reply to “Erlang Error Messages”

  1. Pingback: Kevin’s Link Blog » Summary of Common Erlang Errors

Leave a Reply

Your email address will not be published.