Skip to content

Instantly share code, notes, and snippets.

@vodafon
Created August 23, 2011 11:25
Show Gist options
  • Save vodafon/1164893 to your computer and use it in GitHub Desktop.
Save vodafon/1164893 to your computer and use it in GitHub Desktop.
%% err1
-module(err1).
-export([undefined_function/3, undefined_lambda/3]).
undefined_function(Mod, Func, Args) ->
[Mod, Func, Args].
undefined_lambda(Module, Fun, Args) ->
[Module,Fun,Args].
%% test
-module(test).
-export([start/0]).
start() ->
process_flag(error_handler, err1),
test:afkj().
%%%%%%%%%%%
$ erlc err1.erl test.erl
$ erl
>test:start().
** exception error: undefined function test:afkj/0
>c(err1).
>test:start().
[test,afkj,[]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment