You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Geert Van Damme <GV...@vdab.be> on 2003/06/17 14:32:54 UTC

custom transformer

Hi,

I'm writing a custom transformer, extending the AbstractDOMTransformer. Is there a way to throw an exception from this transformer so that the error handling pipeline of the sitemap is 'activated' ? (the transform method signature does not throw an exception). Or is the error handling from the sitemap only meant for SAXExceptions ?

I'm using Cocoon2.0.4

thanks !
Geert



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: custom transformer

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
Le Mardi, 17 juin 2003, à 16:09 Europe/Zurich, Martin Holz a écrit :

> "Geert Van Damme" <GV...@vdab.be> writes:
>
>> Hi,
>>
>> I'm writing a custom transformer, extending the 
>> AbstractDOMTransformer. Is there a way to throw an exception from 
>> this transformer so that the error handling pipeline of the sitemap 
>> is 'activated' ? (the transform method signature does not throw an 
>> exception). Or is the error handling from the sitemap only meant for 
>> SAXExceptions ?
>>
>
> Any checked exception in setup or any of the ContentHandler methods 
> should activate
> the error pipline. If you can't throw a ProcessingException in setup, 
> wrap a SAXException
> around your real exception.

In the case of AbstractDOMTransformer, transform() doesn't declare any 
exceptions (which it should IMO), so you might have to rewrite the 
notify() method in your transformer so that your transformation 
operation can throw exceptions.

-Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: custom transformer

Posted by Martin Holz <ho...@fiz-chemie.de>.
"Geert Van Damme" <GV...@vdab.be> writes:

> Hi,
> 
> I'm writing a custom transformer, extending the AbstractDOMTransformer. Is there a way to throw an exception from this transformer so that the error handling pipeline of the sitemap is 'activated' ? (the transform method signature does not throw an exception). Or is the error handling from the sitemap only meant for SAXExceptions ?
> 

Any checked exception in setup or any of the ContentHandler methods should activate 
the error pipline. If you can't throw a ProcessingException in setup, wrap a SAXException
around your real exception. 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org