cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor AbstractProcessingNodeBuilder.java
Date Fri, 31 Oct 2003 15:14:56 GMT
Stefano Mazzocchi wrote:

>
> On Friday, Oct 31, 2003, at 12:31 Europe/Rome, Sylvain Wallez wrote:
>
>> Reinhard Poetz wrote:
>>
>>> From: sylvain@apache.org [mailto:sylvain@apache.org]
>>>
>>>> sylvain     2003/10/31 03:12:56
>>>>
>>>>  Modified:    src/java/org/apache/cocoon Constants.java
>>>>               src/java/org/apache/cocoon/components/treeprocessor
>>>>                        AbstractProcessingNodeBuilder.java
>>>>  Log:
>>>>  Sitemap components now can know their usage location in the sitemap
>>>>
>>>
>>> What does this mean? Can you give me an example?
>>>
>>
>> Wow, you're fast!
>>
>> Here's an example:
>>
>> public void setup(blah, blah, Parameters params) {
>>  getLogger().debug("I am used at location " + 
>> params.getParameter(Constants.SITEMAP_PARAMETER_LOCATION);
>> }
>>
>> --> I am used a location /path/to/sitemap.xmap:234:12
>
>
> Does this mean that we can have the sitemap-oriented stacktraces now 
> <hint/> <hint/>? ;-)


Not yet, and this addition is not related to this: it "only" allows 
sitemap components to issue more descriptive logs and exceptions.

To implement sitemap-oriented stacktraces, I'd like to add treeprocessor 
listeners that would be notified of start/end of sitemap statements and 
of start/end of sitemap processing (yes, it looks like SAX).

Sitemap-level stacktraces can then be implemented by collecting the 
startStatement events and building the corresponding stack trace if 
endProcessing notifies that an error was raised.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Mime
View raw message