Re: Compiler error messages

2012-06-18 Thread Raoul Duke
On Mon, Jun 18, 2012 at 11:44 AM, Brandon Bickford wrote: > I was wondering if anyone was working on improving compiler error messages? > For instance in a case just now when I used an undeclared variable "host" I > received an opaque hundred line traceback.  I think it

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
ingness is the only criteria here. One reason > is for consistency. We're already heading down the track of making > compiler error messages easier to read. It doesn't seem very friendly > to make the compiler error messages easier and then intentionally > leave the runtime errors

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
l__2291.invoke(broken-arity.clj:6) > > I'm not going to make any changes for people unwilling to look a few > lines down in a stack trace. I don't think that unwillingness is the only criteria here. One reason is for consistency. We're already heading down the track of maki

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