On 15 November 2011 10:46, sawyer x <[email protected]> wrote: > On Tue, Nov 15, 2011 at 11:42 AM, damien krotkine <[email protected]> > wrote: >> >> try to parse the config file. If it fails, try to parse the error >> message sent by YAML, and extract the line / column from the message. >> It's usually reported accurately. Then 2 cases : if Carp::Verbose is >> false (general case), perform a croak (not a confess), with a human >> message saying " failed to parse config file '$filename', at line 42, >> column 12. Take extra care to spaces and tabs, blabla". >> If Carp::Verbose is true, then do a confess instead, appending the >> full YAML message. > > Disagree. We shouldn't be trying to parse error messages of other modules. > You cannot be sure it will be consistent between versions or between engines > or between modules. > > We should be outputting a "Reading your configuration file failed. This was > the error message: $msg\n" > Something like that, no more.
Well, if the YAML error message is short enough and explicit enough, sure. But if it's a pile of 500 stack traces, it's not going to help. Also, YAML tend to have criptic concept like BAD_BLOCKS, which the user has to translate into "huh, probably a wrong character". Imho this is what causes the issues. Don't you agree ? _______________________________________________ Dancer-users mailing list [email protected] http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
