[Dancer-users] sane error messages

sawyer x xsawyerx at gmail.com
Sun Jun 24 15:10:10 CEST 2012


On Sun, Jun 24, 2012 at 3:59 PM, Mr. Puneet Kishor <punk.kish at gmail.com>wrote:

>
> However, there is still much to be done. Consider the error message below.


Oh, we're basically against having proper or sane error messages. Insane
error messages build character!


> What it really was trying to tell me what that I had a couple of tabs in
> my "development.yml"
>
> Could the error messages be made more sane by default?
>

There are several ways and they were often discussed.

The problem stems from this being a curried error, meaning it comes from
elsewhere. This time from the YAML module.
The YAML module said it failed, and we're currying the error it indicated.
Unfortunately that error is not very understandable.

Like I said, we did discuss how to make these things easier for end-users.
One suggestion by Dams was to check YAML ourselves and provide a proper
error message. However, this would become quite difficult in Dancer 2 since
it will have various configuration engines (to allow you use to JSON, INI
or other formats you might like more than YAML). We would not be able to
write our own meta-parsers for each format and check it before the actual
format parser parses it. It's not very clever.

Instead, another way is to provide a cleaner more understandable output
when YAML fails. Unfortunately we can't always control how it failed. We do
try to make it clear it's the parser by writing "Unable to parse the
configuration file". We're more than open on any suggestion you may have on
how to make this easier.

So, unfortunately this is much less of a "Dancer problem" and more of a
"YAML problem".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20120624/12ff05dc/attachment.htm>


More information about the Dancer-users mailing list