Re: Improved compiler error messages, part 2

2008-09-19 Thread Allen Rohner
> > I've enhanced handling of reader errors during load (rev 1033), see if > that helps. > > Rich Looks good. Thanks! Allen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Re: Improved compiler error messages, part 2

2008-09-19 Thread Rich Hickey
On Sep 18, 12:07 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > Ok, I have a new one. > > Reader errors don't tell you the name of the file that had problems: > > eof.clj: > > (defn foo [a] >(println "hello") > > $ java -cp clojure.jar clojure.lang.Repl eof.clj > java.lang.Exception: ReaderEr

Re: Improved compiler error messages, part 2

2008-09-18 Thread Allen Rohner
> > Reader errors don't tell you the name of the file that had problems: > > eof.clj: > > (defn foo [a] >    (println "hello") > > $ java -cp clojure.jar clojure.lang.Repl eof.clj > java.lang.Exception: ReaderError:(3,1) EOF while reading >         at clojure.lang.LispReader.read(LispReader.java:

Re: Improved compiler error messages, part 2

2008-09-18 Thread Allen Rohner
Ok, I have a new one. Reader errors don't tell you the name of the file that had problems: eof.clj: (defn foo [a] (println "hello") $ java -cp clojure.jar clojure.lang.Repl eof.clj java.lang.Exception: ReaderError:(3,1) EOF while reading at clojure.lang.LispReader.read(LispReader.ja

Re: Improved compiler error messages, part 2

2008-09-18 Thread Allen Rohner
> I've made some enhancements to the location info (rev 1031), see if > that helps. > > Rich This looks good. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: Improved compiler error messages, part 2

2008-09-18 Thread Rich Hickey
On Sep 17, 9:15 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > Ok, concrete. > > Here's one mistake I made the other day. I created a ref, and then > forgot to access it using @. The example code is > > (def my_map (ref {:a 1, :b 2})) > (def map_vals (vals my_map)) > > $ java -cp clojure-clean.ja

Re: Improved compiler error messages, part 2

2008-09-17 Thread Allen Rohner
Ok, concrete. Here's one mistake I made the other day. I created a ref, and then forgot to access it using @. The example code is (def my_map (ref {:a 1, :b 2})) (def map_vals (vals my_map)) $ java -cp clojure-clean.jar clojure.lang.Repl bad-ref.clj java.lang.IllegalArgumentException: Don't kno

Re: Improved compiler error messages, part 2

2008-09-17 Thread Rich Hickey
On Sep 17, 2:55 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > > It seems to me you need to distinguish runtime errors from compilation > > errors. For runtime errors, the file and line numbers are already in > > the stack trace, as Clojure emits that information in the bytecode. > > For example,

Re: Improved compiler error messages, part 2

2008-09-17 Thread Raoul Duke
On Wed, Sep 17, 2008 at 11:55 AM, Allen Rohner <[EMAIL PROTECTED]> wrote: > I don't think that unwillingness is the only criteria here. One reason yes! +N for usability through extreme clarity. signal-to-noise is important. sincerely. --~--~-~--~~~---~--~~ You re

Re: Improved compiler error messages, part 2

2008-09-17 Thread Allen Rohner
> It seems to me you need to distinguish runtime errors from compilation > errors. For runtime errors, the file and line numbers are already in > the stack trace, as Clojure emits that information in the bytecode. > For example, in the above trace: > > >         at user.eval__2291.invoke(broken-a

Re: Improved compiler error messages, part 2

2008-09-17 Thread Rich Hickey
On Sep 17, 1:54 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > After feedback on my previous compiler error message patch, > I've started looking into the problem more. My goal is to have the > file and line number printed on every user-visible stack trace. > > An example of my desired output is:

Improved compiler error messages, part 2

2008-09-17 Thread Allen Rohner
After feedback on my previous compiler error message patch, I've started looking into the problem more. My goal is to have the file and line number printed on every user-visible stack trace. An example of my desired output is: java.lang.IllegalArgumentException: /Users/arohner/Programming/clojur