Last active
July 10, 2017 02:46
-
-
Save dongyuwei/48042b33d191880ddbdde80e581e6577 to your computer and use it in GitHub Desktop.
Erlang's method_missing : '$handle_undefined_function'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(method_missing). | |
-export(['$handle_undefined_function'/2]). | |
'$handle_undefined_function'(Func, Args) -> | |
io:format("Called undefined function '~p' with args ~p.~n", [Func, Args]). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/erlang/otp/blob/maint/lib/kernel/src/error_handler.erl#L139
test in erl shell
c(method_missing).
method_missing:foobar(1,2).