On Dec 7, 2008, at 3:13 PM, Michael Wood wrote:

With or without your patch I still get no line numbers for some things
at the REPL.
e.g. if I try to evaluate a non-existent symbol:

$ java -cp clojure.jar clojure.main
Clojure
user=> blah
java.lang.Exception: Unable to resolve symbol: blah in this context
(NO_SOURCE_FILE:0)
user=> blah
java.lang.Exception: Unable to resolve symbol: blah in this context
(NO_SOURCE_FILE:0)
user=> blah
java.lang.Exception: Unable to resolve symbol: blah in this context
(NO_SOURCE_FILE:0)

whereas if I try to evaluate a nonexistent function, I do get a line
number in the error:

user=> (some-function)
java.lang.Exception: Unable to resolve symbol: some-function in this
context (NO_SOURCE_FILE:4)

For a repl that supports line numbers, I've written clojure.contrib.repl-ln:

% java -cp clojure.jar:clojure-contrib.jar clojure.contrib.repl_ln
Clojure
1:1 user=> blah
java.lang.Exception: Unable to resolve symbol: blah in this context (repl-1:1)
1:2 user=> blah
java.lang.Exception: Unable to resolve symbol: blah in this context (repl-1:2)
1:3 user=> blah
java.lang.Exception: Unable to resolve symbol: blah in this context (repl-1:3)
1:4 user=> (some-function)
java.lang.Exception: Unable to resolve symbol: some-function in this context (repl-1:4)
1:5 user=> (some-function)
java.lang.Exception: Unable to resolve symbol: some-function in this context (repl-1:5)
1:6 user=> blah
java.lang.Exception: Unable to resolve symbol: blah in this context (repl-1:6)
1:7 user=>

--Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to