You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Zein Dowe <zb...@gmx.net> on 2002/09/26 09:37:53 UTC
[newbie] ESQL Error Handling
Hi,
i got some questions about the esql logicsheet from cocoon.
I suppose the first one is easy to answer:
1. How can i count the number of rows from the result of my query?
The second one seems quit more difficult to me (but i am a newbie and know
nothing ;-):
2. How can I handle the exception which is thrown if the database connection
fails?
If i get it right, this kind of exception is handled by cocoon itself and
not
by the esql-logicsheet. So how can i prevent that the ugly cocoon exception
window pops up and, instead of that, show a message which
says that the connection process has failed?
If somebody knows the answers or has some suggestions, i would be
very grateful if you share them with me.
regards,
Zein
--
Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX wählen -
und tolle Preise absahnen! http://www.onlinestar.de
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [newbie] ESQL Error Handling
Posted by Zein <zb...@gmx.net>.
Thank you for your help!
Now everything does what it has to do.
Zein
----- Original Message -----
From: "Vadim Gritsenko" <va...@verizon.net>
To: <co...@xml.apache.org>
Sent: Monday, September 30, 2002 10:23 PM
Subject: Re: [newbie] ESQL Error Handling
> Zein wrote:
>
> >Thank you! <map:handle-errors> works fine!
> >
> >Just one more question:
> >
> >Is it possible to use <map:select>-tag in <map:handle-errors> to prepare
the
> >thrown exception
> >for html or wml whichever device the query came from?
> >
>
> Yes. map:select, map:match, map:action - all are allowed.
>
> Vadim
>
>
>
> >regards,
> >Zein
> >
> >
> >----- Original Message -----
> >From: "Vadim Gritsenko" <va...@verizon.net>
> >To: <co...@xml.apache.org>
> >Sent: Thursday, September 26, 2002 2:26 PM
> >Subject: Re: [newbie] ESQL Error Handling
> >
> >
> >
> >
> >>Zein Dowe wrote:
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>i got some questions about the esql logicsheet from cocoon.
> >>>I suppose the first one is easy to answer:
> >>>
> >>>1. How can i count the number of rows from the result of my query?
> >>>
> >>>
> >>>
> >>Not sure does ESQL has something for this or not, but in any case you
> >>can count using XSLT.
> >>
> >>
> >>
> >>
> >>>The second one seems quit more difficult to me (but i am a newbie and
> >>>
> >>>
> >know
> >
> >
> >>>nothing ;-):
> >>>
> >>>2. How can I handle the exception which is thrown if the database
> >>>
> >>>
> >connection
> >
> >
> >>>fails?
> >>>
> >>>If i get it right, this kind of exception is handled by cocoon itself
and
> >>>not
> >>>by the esql-logicsheet. So how can i prevent that the ugly cocoon
> >>>
> >>>
> >exception
> >
> >
> >>>window pops up and, instead of that, show a message which
> >>>says that the connection process has failed?
> >>>
> >>>
> >>>
> >>Any exception can be handled as you want using <map:handle-errors/>
> >>pipeline in the sitemap. This pipeline has pre-set generator, so you can
> >>write an XSLT to format (and process) the error any way you want it.
> >>
> >>Vadim
> >>
> >>
> >>
> >>
> >>>If somebody knows the answers or has some suggestions, i would be
> >>>very grateful if you share them with me.
> >>>
> >>>regards,
> >>>Zein
> >>>
> >>>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [newbie] ESQL Error Handling
Posted by Vadim Gritsenko <va...@verizon.net>.
Zein wrote:
>Thank you! <map:handle-errors> works fine!
>
>Just one more question:
>
>Is it possible to use <map:select>-tag in <map:handle-errors> to prepare the
>thrown exception
>for html or wml whichever device the query came from?
>
Yes. map:select, map:match, map:action - all are allowed.
Vadim
>regards,
>Zein
>
>
>----- Original Message -----
>From: "Vadim Gritsenko" <va...@verizon.net>
>To: <co...@xml.apache.org>
>Sent: Thursday, September 26, 2002 2:26 PM
>Subject: Re: [newbie] ESQL Error Handling
>
>
>
>
>>Zein Dowe wrote:
>>
>>
>>
>>>Hi,
>>>
>>>i got some questions about the esql logicsheet from cocoon.
>>>I suppose the first one is easy to answer:
>>>
>>>1. How can i count the number of rows from the result of my query?
>>>
>>>
>>>
>>Not sure does ESQL has something for this or not, but in any case you
>>can count using XSLT.
>>
>>
>>
>>
>>>The second one seems quit more difficult to me (but i am a newbie and
>>>
>>>
>know
>
>
>>>nothing ;-):
>>>
>>>2. How can I handle the exception which is thrown if the database
>>>
>>>
>connection
>
>
>>>fails?
>>>
>>>If i get it right, this kind of exception is handled by cocoon itself and
>>>not
>>>by the esql-logicsheet. So how can i prevent that the ugly cocoon
>>>
>>>
>exception
>
>
>>>window pops up and, instead of that, show a message which
>>>says that the connection process has failed?
>>>
>>>
>>>
>>Any exception can be handled as you want using <map:handle-errors/>
>>pipeline in the sitemap. This pipeline has pre-set generator, so you can
>>write an XSLT to format (and process) the error any way you want it.
>>
>>Vadim
>>
>>
>>
>>
>>>If somebody knows the answers or has some suggestions, i would be
>>>very grateful if you share them with me.
>>>
>>>regards,
>>>Zein
>>>
>>>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [newbie] ESQL Error Handling
Posted by Zein <zb...@gmx.net>.
Thank you! <map:handle-errors> works fine!
Just one more question:
Is it possible to use <map:select>-tag in <map:handle-errors> to prepare the
thrown exception
for html or wml whichever device the query came from?
regards,
Zein
----- Original Message -----
From: "Vadim Gritsenko" <va...@verizon.net>
To: <co...@xml.apache.org>
Sent: Thursday, September 26, 2002 2:26 PM
Subject: Re: [newbie] ESQL Error Handling
> Zein Dowe wrote:
>
> >Hi,
> >
> >i got some questions about the esql logicsheet from cocoon.
> >I suppose the first one is easy to answer:
> >
> >1. How can i count the number of rows from the result of my query?
> >
>
> Not sure does ESQL has something for this or not, but in any case you
> can count using XSLT.
>
>
> >The second one seems quit more difficult to me (but i am a newbie and
know
> >nothing ;-):
> >
> >2. How can I handle the exception which is thrown if the database
connection
> >fails?
> >
> >If i get it right, this kind of exception is handled by cocoon itself and
> >not
> >by the esql-logicsheet. So how can i prevent that the ugly cocoon
exception
> >window pops up and, instead of that, show a message which
> >says that the connection process has failed?
> >
>
> Any exception can be handled as you want using <map:handle-errors/>
> pipeline in the sitemap. This pipeline has pre-set generator, so you can
> write an XSLT to format (and process) the error any way you want it.
>
> Vadim
>
>
> >If somebody knows the answers or has some suggestions, i would be
> >very grateful if you share them with me.
> >
> >regards,
> >Zein
> >
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [newbie] ESQL Error Handling
Posted by Vadim Gritsenko <va...@verizon.net>.
Zein Dowe wrote:
>Hi,
>
>i got some questions about the esql logicsheet from cocoon.
>I suppose the first one is easy to answer:
>
>1. How can i count the number of rows from the result of my query?
>
Not sure does ESQL has something for this or not, but in any case you
can count using XSLT.
>The second one seems quit more difficult to me (but i am a newbie and know
>nothing ;-):
>
>2. How can I handle the exception which is thrown if the database connection
>fails?
>
>If i get it right, this kind of exception is handled by cocoon itself and
>not
>by the esql-logicsheet. So how can i prevent that the ugly cocoon exception
>window pops up and, instead of that, show a message which
>says that the connection process has failed?
>
Any exception can be handled as you want using <map:handle-errors/>
pipeline in the sitemap. This pipeline has pre-set generator, so you can
write an XSLT to format (and process) the error any way you want it.
Vadim
>If somebody knows the answers or has some suggestions, i would be
>very grateful if you share them with me.
>
>regards,
>Zein
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [newbie] ESQL Error Handling
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 26.Sep.2002 -- 09:37 AM, Zein Dowe wrote:
> Hi,
>
> i got some questions about the esql logicsheet from cocoon.
> I suppose the first one is easy to answer:
>
> 1. How can i count the number of rows from the result of my query?
There's a row-count tag but it works only with some cases. You saftest
bet is to count the rows as you retrieve them. If you need paging or
something, esql provides a limit clause. See docs and search this list.
> The second one seems quit more difficult to me (but i am a newbie and know
> nothing ;-):
>
> 2. How can I handle the exception which is thrown if the database connection
> fails?
You can override the error handler in your sitemap.
Other errors can be handled in the <esql:error-results/>
block. Connection errors not, I'm afraid.
Chris.
Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>