1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
.TH error_handler 3 "kernel 2.12.3" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
error_handler \- Default System Error Handler
.SH DESCRIPTION
.LP
The error handler module defines what happens when certain types of errors occur\&.
.SH EXPORTS
.LP
.B
undefined_function(Module, Function, Args) -> term()
.br
.RS
.TP
Types
Module = Function = atom()
.br
Args = [term()]
.br
A (possibly empty) list of arguments \fIArg1, \&.\&., ArgN\fR
.br
.RE
.RS
.LP
This function is evaluated if a call is made to \fIModule:Function(Arg1, \&.\&., ArgN)\fR and \fIModule:Function/N\fR is undefined\&. Note that \fIundefined_function/3\fR is evaluated inside the process making the original call\&.
.LP
If \fIModule\fR is interpreted, the interpreter is invoked and the return value of the interpreted \fIFunction(Arg1, \&.\&., ArgN)\fR call is returned\&.
.LP
Otherwise, it returns, if possible, the value of \fIapply(Module, Function, Args)\fR after an attempt has been made to autoload \fIModule\fR\&. If this is not possible, the call to \fIModule:Function(Arg1, \&.\&., ArgN)\fR fails with exit reason \fIundef\fR\&.
.RE
.LP
.B
undefined_lambda(Module, Fun, Args) -> term()
.br
.RS
.TP
Types
Module = Function = atom()
.br
Args = [term()]
.br
A (possibly empty) list of arguments \fIArg1, \&.\&., ArgN\fR
.br
.RE
.RS
.LP
This function is evaluated if a call is made to \fIFun(Arg1, \&.\&., ArgN)\fR when the module defining the fun is not loaded\&. The function is evaluated inside the process making the original call\&.
.LP
If \fIModule\fR is interpreted, the interpreter is invoked and the return value of the interpreted \fIFun(Arg1, \&.\&., ArgN)\fR call is returned\&.
.LP
Otherwise, it returns, if possible, the value of \fIapply(Fun, Args)\fR after an attempt has been made to autoload \fIModule\fR\&. If this is not possible, the call fails with exit reason \fIundef\fR\&.
.RE
.SH NOTES
.LP
The code in \fIerror_handler\fR is complex and should not be changed without fully understanding the interaction between the error handler, the \fIinit\fR process of the code server, and the I/O mechanism of the code\&.
.LP
Changes in the code which may seem small can cause a deadlock as unforeseen consequences may occur\&. The use of \fIinput\fR is dangerous in this type of code\&.
|