[erlang-bugs] Incorrect line number in stacktrace when using atom as binary
Wed Jan 15 09:17:50 CET 2014
Recently I've stuck with error "** exception error: bad argument"
while doing obviously wrong <<A/binary>> (A :: atom()), but I've
noticed, that line number, that shows along with error message, was
Consider this code:
Let's compile it and run in shell (R16B03, B02 is also affected):
** exception error: bad argument
in function bug:test/1 (src/bug.erl, line 8)
So, as we can see, line 8 is pointed at "erlang:display(A)", but error
was occured on line 9. It can be very confusing while debugging large
modules. I think it's a bug because of it points on invalid line and
with other errors there is no such behaviour.
Thanks for attention.
More information about the erlang-bugs