cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Exception handling and XObject
Date Sun, 29 Oct 2000 12:48:18 GMT
At 10:45 +0200 27/10/00, m.homeijer@devote.nl wrote:
>I am using XObjects to generate data from EJB calls into XML documents.
>This process can result in different exceptions, however the toDom method
>in the XObject interface does not declare any errors.
>
>In other classes I choose to pass every exception to the XSP page and
>handle it there.
>If I want to achieve this in the toDom method, this means creating a
>descendant of RuntimeException and wrapping my original exception with it.
>This way I can throw the wrapped exception and handle it in XSP.
>
>This seems like a diry workaround. Does anybody have another solution?

I use XObject too.

In my about-to-be-released XSP Mailer TagLib, toDOM or toSAX call the
send() method, then output any errors (collected in a Hashtable) as XML
into the Node or DocumentHandler that they receive.

In the next version of the FP TagLib, the parent of each fp:tag is marked
with a unique ID attribute, then these IDs are used to mark the output
error XML, so that each error can be "linked" to the form element where it
happened.

Hope this helps

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pager:jermq@sms.genie.co.uk>

Mime
View raw message