Re: Reporting errors in PhD

From: Date: Fri, 08 Jan 2010 10:59:14 +0000
Subject: Re: Reporting errors in PhD
References: 1 2 3  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969381259@lists.php.net to get a copy of this message
On Fri, Jan 8, 2010 at 11:54, Richard Quadling <rquadling@googlemail.com> wrote: > 2010/1/8 Hannes Magnusson <hannes.magnusson@gmail.com>: >> On Fri, Jan 8, 2010 at 10:55, Richard Quadling <rquadling@googlemail.com> wrote: >>> Hi. >>> >>> Something that I would like to update in PhD is when an error is >>> reported (say VERBOSE_MISSING_ATTRIBUTES), to be able to include the >>> xml:ID of the nearest ancestor with an xml:ID. >>> >>> So, ... >>> >>> [VERBOSE_MISSING_ATTRIBUTES] Missing alt attribute for >>> en/features/figures/gc-algorithm.png >>> >>> becomes >>> >>> VERBOSE_MISSING_ATTRIBUTES] Missing alt attribute for >>> en/features/figures/gc-algorithm.png for features.gc.collecting-cycles >>> >>> Is there an easy way to do this that doesn't cost require massive >>> amount of searching? >> >> You can get the current chunk ID with little effort I think. >> IIRC that will even work when building bightml, as chunks are still >> registered, just not rendered as such. > > Any idea how? $<format>->CURRENT_CHUNK >> Speaking of errormessages, "VERBOSE_MISSING_ATTRIBUTES" doesn't really >> have a great meaning. >> We should map the constants to textual representation, so that error >> message above becomes "Missing attributes: Missing alt attribute >> for".. > > Those descriptions are in the errh() function in phpdotnet\phd\functions.php > > Is changing ... > >        // PhD warnings >        VERBOSE_NOVERSION             => 'VERBOSE_NOVERSION', >        VERBOSE_BROKEN_LINKS          => 'VERBOSE_BROKEN_LINKS', >        VERBOSE_MISSING_ATTRIBUTES    => 'VERBOSE_MISSING_ATTRIBUTES', > > to ... > >        // PhD warnings >        VERBOSE_NOVERSION             => 'No version information', >        VERBOSE_BROKEN_LINKS          => 'Broken links', >        VERBOSE_MISSING_ATTRIBUTES    => 'Missing attributes', > > enough for you? That would be what I was thinking, yeah. -Hannes

« previous php.doc (#969381259) next »