cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: ESQL:ERROR-RESULTS
Date Fri, 17 Nov 2000 20:29:10 GMT
On Thu, 16 Nov 2000, Marco Spinetti wrote:

> Hi all, my question regards the management of the mistakes in Esql. I
> have read that every error is managed in the Tag <esql:error-results>
> is it true? Does this mean that if a mistake is verified in the
> connection to the database the code inside of such tag is executed?
>  How can I to distinguish the various kinds of exception? In Java the
> Try block which can have several Catch blocks in which you can manage
> the various exceptions exists: inside <esql:error-results> how I can
> distinguish and manage the various exceptions?  I think that the
> management of the errors is one of the more important things in the
> connection with a database: from this drift my question.  You can help
> me?  Marco m.spinetti@pisa.iol.it

if you include an esql:error-results element, any SQLExceptions that are
thrown while executing a query or accessing its results will be caught
there and your error-results section will be instantiated. esql makes no
attempt to catch any other exceptions, and if you include no error-results
sections, even SQLExceptions will be tossed upwards. if you want your page
to do fancier error processing, simply enclose the relevant sections of
your esql elements with try/catch blocks.

- donald


Mime
View raw message