From f22da5738e7fd4995d177d602c29bd80d8072ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sun, 13 Jan 2013 09:09:18 +0100 Subject: Teach error_handler to call '$handle_undefined_function' --- lib/kernel/doc/src/error_handler.xml | 38 +++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) (limited to 'lib/kernel/doc') diff --git a/lib/kernel/doc/src/error_handler.xml b/lib/kernel/doc/src/error_handler.xml index acbf9a2c6e..610b65f0a2 100644 --- a/lib/kernel/doc/src/error_handler.xml +++ b/lib/kernel/doc/src/error_handler.xml @@ -43,19 +43,39 @@ A (possibly empty) list of arguments Arg1,..,ArgN -

This function is evaluated if a call is made to +

This function is called by the run-time system if a call is made to Module:Function(Arg1,.., ArgN) and Module:Function/N is undefined. Note that undefined_function/3 is evaluated inside the process making the original call.

-

If Module is interpreted, the interpreter is invoked - and the return value of the interpreted - Function(Arg1,.., ArgN) call is returned.

-

Otherwise, it returns, if possible, the value of - apply(Module, Function, Args) after an attempt has been - made to autoload Module. If this is not possible, the - call to Module:Function(Arg1,.., ArgN) fails with - exit reason undef.

+ +

This function will first attempt to autoload + Module. If that is not possible, + an undef exception will be raised.

+ +

If it was possible to load Module + and the function Function/N is exported, + it will be called.

+ +

Otherwise, if the function '$handle_undefined_function'/2 + is exported, it will be called as + '$handle_undefined_function'(Function, + Args). +

+

Otherwise an undef exception will be raised.

+
+ + + + Raise an undef exception + + A (possibly empty) list of arguments Arg1,..,ArgN + + +

Raise an undef exception with a stacktrace indicating + that Module:Function/N is + undefined. +

-- cgit v1.2.3