[Ericsson AB]

error_handler

MODULE

error_handler

MODULE SUMMARY

Default System Error Handler

DESCRIPTION

The error handler module defines what happens when certain types of errors occur.

EXPORTS

undefined_function(Module, Func, ArgList) -> term()

Types:

Module = Func = atom()
ArgList = [term()]

This function is evaluated if a call is made to Module:Func(ArgList) which is undefined. This function is evaluated inside the process making the original call.

If Module is interpreted, the interpreter is invoked and the return value of the interpreted Func(ArgList) call is returned.

Otherwise, it returns, if possible, the value of apply(Module, Func, ArgList) after an attempt has been made to autoload Module. If this is not possible, the function calling Module:Func(ArgList) is exited.

undefined_lambda(Module, Fun, ArgList) -> term()

Types:

Module = Func = atom()
ArgList = [term()]

This function is evaluated if a call is made to Fun(ArgList) when the module defining the fun is not loaded. This function is evaluated inside the process making the original call.

If Module is interpreted, the interpreter is invoked and the return value of the interpreted Fun(ArgList) call is returned.

Otherwise, it returns, if possible, the value of apply(Fun, ArgList) after an attempt has been made to autoload Module. If this is not possible, the process calling the fun is exited.

Notes

The code in error_handler is complex and should not be changed without fully understanding the interaction between the error handler, the init process of the code server, and the I/O mechanism of the code.

Changes in the code which may seem small can cause a deadlock as unforeseen consequences may occur. The use of input is dangerous in this type of code.

AUTHORS

Joe Armstrong - support@erlang.ericsson.se
Robert Virding - support@erlang.ericsson.se
Magnus Froberg - support@erlang.ericsson.se

kernel 2.10.3
Copyright © 1991-2004 Ericsson AB