[erlang-questions] Displaying the line number when error occured
June Kim
juneaftn@REDACTED
Mon May 21 04:40:08 CEST 2007
Alright. No one has answered my question yet.
When an error occurs how do you find the location in the source
file(without the information of source line number)? What is the
conventional way in Erlang?
2007/5/18, June Kim <juneaftn@REDACTED>:
> Suppose foo.erl is:
>
> -module(foo).
> -export([bar/1]).
>
> bar(X)->
> 1+2+3,
> 5=X.
>
> ==============
>
> 8> foo:bar(5).
>
> =ERROR REPORT==== 18-May-2007::23:08:44 ===
> Error in process <0.61.0> with exit value:
> {{badmatch,5},[{foo,bar,1},{shell,exprs,6},{shell,eval_loop,3}]}
>
> ** exited: {{badmatch,5},
> [{foo,bar,1},{shell,exprs,6},{shell,eval_loop,3}]} **
>
> The report isn't very helpful. Is there any way I can see the line
> number of the source code that the error occured?
>
More information about the erlang-questions
mailing list