[erlang-questions] Line number in errors: badmatch, case clause, badarith

Thomas Lindgren <>
Tue Jan 12 13:11:31 CET 2010





----- Original Message ----
> From: Max Lapshin <>
> To: Erlang-Questions Questions <>
> Sent: Tue, January 12, 2010 8:16:42 AM
> Subject: [erlang-questions] Line number in errors: badmatch, case clause, badarith
> 
> Is it hard to change format of runtime errors to include line number,
> where error appeared.
> I understand, that it is impossible to understand, on which line
> function arguments hasn't matched,
> but it is clearly determined, on which line badmatch or badarith has happened.
> 
> Are there hidden problems with such error information?


I think the compiler should add such info to exceptions, but it hasn't happened yet. In the meantime, you could try this: git://github.com/thomasl/smart_exceptions.git

(The "devel" version seems to work fairly well, but no promises.)

Best,
Thomas

PS. Given that OTP has taken the fantastic step of using github, maybe I ought to submit that patch myself?


      


More information about the erlang-questions mailing list