[erlang-questions] Improve $handle_undefined_function
Tue Jan 22 07:34:44 CET 2013
On Mon, Jan 21, 2013 at 7:04 PM, Loïc Hoguin <> wrote:
> My proposal is to use an attribute to list the functions defined like
> this, so that error_handler can make the distinction between undef and
> badarg directly. The above function would then be written like this:
> $handle_undefined_function(**monitor, [process, Pid]) ->
> $handle_undefined_function(**demonitor, Pid) ->
I don't really get the rationale for your proposal.
If have understood you correctly, I must know beforehand
which functions that $handle_undefined_function would handle,
and put all functions to be handled in an attribute.
Why not use the existing -export() attribute and write like
monitor(process, Pid) ->
So what would be the advantage of your version?
Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions