[erlang-bugs] Annoying catch in timer:tc/3

Torbjorn Tornkvist tobbe@REDACTED
Fri Mar 28 09:42:48 CET 2008


Why is it a catch hidden in timer:tc/3 ?

tc(M, F, A) ->
    Before = erlang:now(),
    Val = (catch apply(M, F, A)),        % <== ANNOYING CATCH HERE !!
    After = erlang:now(),
    {now_diff(After, Before), Val}.

I suggest that it is removed.

Cheers, Tobbe




More information about the erlang-bugs mailing list