[augeas-devel] Re: Lens debug messages (Was: [Interfaces] Draft lense)

Raphaël Pinson raphink at gmail.com
Wed Aug 27 11:47:01 UTC 2008


On Wed, Aug 27, 2008 at 2:29 AM, David Lutterkort <lutter at redhat.com> wrote:

> On Tue, 2008-08-26 at 07:45 +0200, Raphaël Pinson wrote:
> > I suggested a way to improve lens debug earlier in this thread. I
> > think it would be very useful if the debug message included the trees
> > generated in the various situations. For example with the error given
> > by Free earlier:
> >
> >
> >         lenses/interfaces.aug:27.3-.
> >         65:Failed to compile auto
> >         lenses/interfaces.aug:27.19-.63:exception: ambiguous
> >         concatenation
> >              'auto\\\nA# A\n' can be split into
> >              'auto\\\nA|=|# A\n'
> >
> >             and
> >              'auto\\\nA# A|=|\n'
> >
> >
> >            First lens: lenses/interfaces.aug:21.37-.100
> >            Second lens: lenses/interfaces.aug:27.50-.62
> >
> >
> > it could say (or I'm guessing it could):
> >
> >
> > lens/interfaces.aug:27.3-.65:Failed to compile auto
> > lenses/interfaces.aug:27.19-.63:exception: ambiguous concatenation
> >     The string 'auto\\\nA# A\n' can be split into
> >     'auto\\\nA|=|# A\n' generating the tree
> > { "auto"
> >    { "1" = "A"
> >       { "comment" = "A" } } }
> >
> >
> >    and
> >     'auto\\\nA# A|=|\n' generating the tree
> >           { "auto"
> >              { "1" = "A# A" } }
> >        First lens: lenses/interfaces.aug:21.37-.100
> >        Second lens: lenses/interfaces.aug:27.50-.62
> >
> >
> > This would make it much clearer already imo.
>
> Hmm .. it would involve a bit of work, but would probably be doable. Is
> the issue then mostly with tracing back what the first and second lens
> in the error message are all about ?
>


Yes I think so... At least I've found that putting the errors into trees
helped understanding them.


Raphael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080827/83d7fbf8/attachment.htm>


More information about the augeas-devel mailing list