David and Meikel:
Thanks for your responses, but it appears to me that what you say applies only to error messages referring to evaluation of defn expressions. Constructing my function definitions in a file separate from the REPL and then recompiling the entire file with a load-file whenever I make a change results in the correct line number being given to me for errors detected by the compiler -- but if an error occurs later when I am exercising the compiled code, the line number given to me doesn't appear to refer to the source file from which the compiling was done -- nor does the line number given to me for an error occurring in evaluation of an expression entered in the REPL refer to the REPL line within which the expression occurred. To wit, for my original example error message

java.lang.Exception: Unsupported binding form: (quote symb) 
(NO_SOURCE_FILE:5045)


the REPL line which resulted in the error message was 15392, not 5045.

So where does the 5045 come from?
--Larry




On 1/3/12 12:59 PM, Meikel Brandmeyer wrote:
Hi,

Am 03.01.2012 um 18:24 schrieb David Nolen:

On Tue, Jan 3, 2012 at 12:09 PM, Larry Travis<tra...@cs.wisc.edu>  wrote:
But my error messages are more likely to look like this:

java.lang.Exception: Unsupported binding form: (quote symb) 
(NO_SOURCE_FILE:5045)


Where does the 5045 come from and what does it mean?  Is there some way I could 
manage and load my defn files, or manage my evaluations of defn expressions in 
the REPL, so that such error messages would always give me a useful line number 
like the 323 in the first example?
You obviously type in a lot in the repl. NO_SOURCE_FILE usually means repl, and 
5045 is exactly that line typed into the repl. If you want to change that, you 
have to put your function definitions into files. Loading from the file will 
then give the accurate information form the former example.

If you want accurate error locations make sure to recompile the whole file 
instead of evaluating expressions one at a time. The tools could of course 
improve here by setting the line number explicitly when evaluating expressions 
one at a time.
VimClojure does set the file and line information correctly when sending single 
definitions from a clojure buffer to a server backend. So the last function 
sent will always give accurate information. However the definitions following 
the sent toplevel form might get slowly out of sync. So reloading the whole 
file from time to time is a good idea to get everything in sync again. (Beware 
other dangers like redefined protocols etc.)

Sincerely
Meikel


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to