[erlang-questions] case or clause
Fri Jan 9 13:37:25 CET 2009
--- On Fri, 1/9/09, David Budworth <> wrote:
> is it more useful?
> if I have:
> f(a,Var) -> ok;
> f(b,Var) -> 10/0;
> f(c,Var) -> ok.
> and call: f(b,foo)
> The error message would say it failed in "f/2"
> It doesn't tell me at all which one it actually failed
You could try smart_exceptions in jungerl (or github if you're feeling brave, where I'm working on a rewrite). It tries to mark all exceptions with module, line, etc. I have found it quite helpful, but it's not a bulletproof drop-in replacement.
Ideally, the compiler should of course do this instead.
More information about the erlang-questions