The error information is handled by the error logger, a
system process registered as error_logger. This process
receives all error messages from the Erlang runtime system and
also from the standard behaviours and different Erlang/OTP
applications.

The exit reasons (such as badarg above) used by
the runtime system are described in
Errors and Error Handling
in the Erlang Reference Manual.

The process error_logger and its user interface (with
the same name) are described in
error_logger(3).
It is possible to configure the system so that error information
is written to file instead/as well as tty. Also, it is possible
for user defined applications to send and format error
information using error_logger.

The standard behaviors (supervisor, gen_server,
etc.) sends progress and error information to error_logger.
If the SASL application is started, this information is written
to tty as well. See
SASL Error Logging
in the SASL User's Guide for further information.