table of contents
- buster 1:21.2.6+dfsg-1
- testing 1:23.2.6+dfsg-1
- unstable 1:23.2.6+dfsg-1
- experimental 1:24.0.5+dfsg-1
error_handler(3erl) | Erlang Module Definition | error_handler(3erl) |
NAME¶
error_handler - Default system error handler.DESCRIPTION¶
This module defines what happens when certain types of errors occur.EXPORTS¶
raise_undef_exception(Module, Function, Args) -> no_return()
Types:
Args = list()
Raises an undef exception with a stacktrace, indicating that Module:Function/N is undefined.
undefined_function(Module, Function, Args) -> any()
Types:
Args = list()
This function is called by the runtime system if a call is made to Module:Function(Arg1,.., ArgN) and Module:Function/N is undefined. Notice that this function is evaluated inside the process making the original call.
This function first attempts to autoload Module. If that is not possible, an undef exception is raised.
If it is possible to load Module and function Function/N is exported, it is called.
Otherwise, if function '$handle_undefined_function'/2 is exported, it is called as '$handle_undefined_function'(Function, Args).
Otherwise an undef exception is raised.
undefined_lambda(Module, Fun, Args) -> term()
Types:
Fun = function()
Args = list()
This function is evaluated if a call is made to Fun(Arg1,.., ArgN) when the module defining the fun is not loaded. The 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(Arg1,.., ArgN) call is returned.
Otherwise, it returns, if possible, the value of apply(Fun, Args) after an attempt is made to autoload Module. If this is not possible, the call fails with exit reason undef.
NOTES¶
The code in error_handler is complex. Do not change it without fully understanding the interaction between the error handler, the init process of the code server, and the I/O mechanism of the code.Code changes that seem small can cause a deadlock, as unforeseen consequences can occur. The use of input is dangerous in this type of code.
kernel 6.2 | Ericsson AB |