[racket-dev] Error message structure (error-message overhaul)
I don't know if it is intended, but these messages come across as just
disliking the idea of putting more (and structured) information into
the error messages. I'm guessing Eli does not intend that, but since I
got that feeling, I wanted to say that I strongly support the current
trend towards more information.
And while I'm certainly biased, I don't dread showing the (plot sin)
message to a Racket outsider. I think it is pretty informative, if you
start at the beginning and read it out loud.
Anyways, I can see two possibilities to help here. See if either of
them seem reasonable to those unsatisfied:
1) we can adjust pretty-print so it (when it fits), puts lists that
have keywords followed by non-keywords on the same line. That is,
instead of something like this in the middle of the (plot sin) error:
#:x-max
(or/c rational? #f)
#:x-min
(or/c rational? #f)
we'd have things like this:
#:x-max (or/c rational? #f)
#:x-min (or/c rational? #f)
I think that'll cut about 1/3rd of the error message length, maybe more.
2) in DrRacket, we can adjust the error print handler so that it
prints only the first three or four lines (or perhaps the first two
sections or something like that) and then puts a "more ..." link (in a
different font in a nice looking way like we see all over the web)
that will unfold the entire error.
The second one addresses the "I can't find the beginning of the
message" (which I do agree is an important HCI consideration).
Robby
On Tue, Jun 19, 2012 at 11:00 PM, Neil Toronto <neil.toronto at gmail.com> wrote:
> On 06/19/2012 06:11 PM, Eli Barzilay wrote:
>>
>> * There are two contexts where error messages are unwieldy: TR and
>> contract errors. In both of these the error text is huge to the
>> point of making a useless text that you need to manually grep
>> through. In TR it got bad enough that Vincent put some serious
>> effort in making them shorter, and with contracts the problem is
>> still there (though not as bad as TR was). This was something
>> that we talked about at some point -- consider a very likely
>> mistake:
>>
>> (plot sin)
>>
>> This results in more than 80 lines of an error message, getting
>> the "TR effect" where in drracket you're now staring at the
>> bottom of that goop and have no clue what to make of it.
>
>
> Hear, hear! I make this mistake myself after going a month or two without
> plotting anything. Every time, I've dreaded some possible future in which I
> do it in front of a non-Racketeer.
>
> I've not dreaded it enough to chuck the contract system in plot, though I've
> been close.
>
> Neil ⊥
>
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev