Catching Exceptions in XPL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Catching Exceptions in XPL

Mark Gibson-2
Hello,
   Is it possible within an XPL pipeline to catch an exception and change
the processing flow.

For example:

I'm executing an SQL query (with oxf:sql processor) that inserts or
updates a table. I want to be able to catch constraint violation
exceptions throw by the database interface, and redirect processing
flow through another XPL processor - this needs to be done within an
XPL pipeline, not just in a generic catch-all exception handling
pipeline.

Can anyone help?

I've heard 'oxf:exception-catcher' mentioned in the list, but cannot
find it documented anywhere.

Cheers
--
Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk>
Web Developer & Database Admin
Cromwell Tools Ltd.
Leicester, England.

___________________________________________________
 
This email is intended for the named recipient. The information contained
in it is confidential.  You should not copy it for any purposes, nor
disclose its contents to any other party.  If you received this email
in error, please notify the sender immediately via email, and delete it from
your computer.
 
Any views or opinions presented are solely those of the author and do not
necessarily represent those of the company.
 
Registered Office: PO Box 14, Chartwell Dr, Wigston, Leicester. LE18 1AT
__________________________________________________




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Catching Exceptions in XPL

Ryan Puddephatt
Mark,
        I don't think the exception-catcher has any documentation at the
moment, but place it after you run your SQL processor, if there is an
exception it will output XML details of the exception, otherwise it will
give it input. You could then use p:choose to see if an exists

<p:processor name="oxf:exception-catcher">
        <p:input name="data" href="#sql-output"/>
        <p:output name="data" id="#exception-check"/>
</p:processor>

Hope this helps

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Mark Gibson [mailto:[hidden email]]
>Sent: 02 February 2006 13:55
>To: [hidden email]
>Subject: [ops-users] Catching Exceptions in XPL
>
>Hello,
>   Is it possible within an XPL pipeline to catch an exception and change
>the processing flow.
>
>For example:
>
>I'm executing an SQL query (with oxf:sql processor) that inserts or
>updates a table. I want to be able to catch constraint violation
>exceptions throw by the database interface, and redirect processing
>flow through another XPL processor - this needs to be done within an
>XPL pipeline, not just in a generic catch-all exception handling
>pipeline.
>
>Can anyone help?
>
>I've heard 'oxf:exception-catcher' mentioned in the list, but cannot
>find it documented anywhere.
>
>Cheers
>--
>Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk>
>Web Developer & Database Admin
>Cromwell Tools Ltd.
>Leicester, England.
>
>___________________________________________________
>
>This email is intended for the named recipient. The information contained
>in it is confidential.  You should not copy it for any purposes, nor
>disclose its contents to any other party.  If you received this email
>in error, please notify the sender immediately via email, and delete it
>from
>your computer.
>
>Any views or opinions presented are solely those of the author and do not
>necessarily represent those of the company.
>
>Registered Office: PO Box 14, Chartwell Dr, Wigston, Leicester. LE18 1AT
>__________________________________________________
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Catching Exceptions in XPL

Erik Bruchez
Administrator
In reply to this post by Mark Gibson-2
Mark,

The oxf:exception-catcher processor is not documented because it is
quite an ugly hack, and that conceptually we would much prefer exception
handling in OPS, which would of course be more flexible.

-Erik

Mark Gibson wrote:

> Hello,
>   Is it possible within an XPL pipeline to catch an exception and change
> the processing flow.
>
> For example:
>
> I'm executing an SQL query (with oxf:sql processor) that inserts or
> updates a table. I want to be able to catch constraint violation
> exceptions throw by the database interface, and redirect processing
> flow through another XPL processor - this needs to be done within an
> XPL pipeline, not just in a generic catch-all exception handling
> pipeline.
>
> Can anyone help?
>
> I've heard 'oxf:exception-catcher' mentioned in the list, but cannot
> find it documented anywhere.
>
> Cheers



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws