Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error line number in repl #203

Closed
laurentpetit opened this issue Mar 15, 2015 · 4 comments
Closed

Wrong error line number in repl #203

laurentpetit opened this issue Mar 15, 2015 · 4 comments

Comments

@laurentpetit
Copy link
Member

Original issue 162 created by laurentpetit on 2010-10-29T11:19:57.000Z:

I wonder if I do something wrong so I have this problem or everyone else is so smart so they can debug whole program without help of debugger or they write consice code, I guess :)

REPRODUCTION

  1. Load a clj file that triggers some runtime error.
  2. Error exception is shown into stderr for example: "java.lang.UnsupportedOperationException: nth not supported on this type: Integer (dbcrud.clj:1)"
  3. Keeping REPL running load file again. Now error is "java.lang.UnsupportedOperationException: nth not supported on this type: Integer (dbcrud.clj:3)"

Complete content (with irrelevant output striped) of repl console view is attached.

Note that line numbers are incrementing with every attempt and seem to be relevant to REPL itself not original source file. So this error message is essentialy useless for error locating. So I have to resort to binary search guessing by commenting out pieces of code.

EXPECTED
Error message shows line number in original clojure file.

VERSION 0.0.64STABLE01

Actually I would like to see whole stack trace that correlates to clojure sources if possible but this is probably subject for other entancement request.

@laurentpetit
Copy link
Member Author

Comment #1 originally posted by laurentpetit on 2010-10-31T07:37:52.000Z:

Ok. I found some workarounds for now.

  1. Set exception breakpoint in debugger, restart repl, load file again.
  2. Use clj-stacktrace.repl utility (http://github.com/mmcgrana/clj-stacktrace).

@laurentpetit
Copy link
Member Author

Comment #2 originally posted by laurentpetit on 2010-11-03T11:00:29.000Z:

Other workaround: clojure.stacktrace namespace provides e function that shows recent exception.

@laurentpetit
Copy link
Member Author

Comment #3 originally posted by laurentpetit on 2012-01-01T22:58:19.000Z:

Investigate to see whether this is still relevant with the new repl machinery

@laurentpetit
Copy link
Member Author

Comment #4 originally posted by laurentpetit on 2012-04-12T06:45:11.000Z:

Invalid as of new REPL versions, IMHO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant