You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by oceatoon <t....@systheo.com> on 2005/05/09 11:17:04 UTC
Error Handling, him or me ???
Hi devers
here again after not finding an answer in user, sorry.
My problem concerns using <map:handle-errors>
It seems I must be doing something wrong, because on a simple not-found
exeption, everything goes great...hmmm...he finds the file(error.html) I
give in sitemap...but then when I visit a proper page the error.html page I
had shown stays as a header of any new page...weird.
Also Sometimes, some pages simply go blank ?? and I get a
[java] 17:09:12.632 WARN!! Error for /cocoo ("my not found resource")
[java] java.lang.StackOverflowError
in console.
offcourse all I have to do is comment out the <map:handle-errors> and all is
fine again. so I ask myself is it bugged or am I ?
I can't get it to be stable.
Is anybody familiar with this problem ?
has anybody managed to set up an error handler stabely?
Thanks
Regards
Tibor
Maybe this will help
SiteMap Exception declaration
**********************************
<map:selectors default="browser">
<map:selector logger="sitemap.selector.exception" name="exception"
src="org.apache.cocoon.selection.ExceptionSelector">
<exception class="org.apache.cocoon.ResourceNotFoundException"
name="not-found"/>
<exception
class="org.apache.cocoon.components.flow.InvalidContinuationException"
name="invalid-continuation"/>
<!-- The statement below tells the selector to unroll as much exceptions as
possible -->
<exception class="java.lang.Throwable" unroll="true"/>
</map:selector>
My Handler
**********************************
<map:handle-errors>
<map:select type="exception">
<map:when test="not-found">
<map:generate src="public/error.xml"/>
<map:call resource="xslt_i18n_xhtml"/>
</map:when>
</map:select>
</map:handle-errors>
Re: Error Handling, him or me ???
Posted by oceatoon <t....@systheo.com>.
Hi Sylvain
> Well, error handlers have been reported to be working fine for years...
Yes that's what I figured,
> Is the page where this problem occurs the main request, or is there some
> surrounding environment such as aggregation, cocoon: et al?
no very basic error handler.it sends an xhtml serialize on a not found
resource.
Well, I got it to work but maybe this is interesting or should simply not be
used this way, even though the sample does.
When I put it into a map:pipeline tag it works fine :D
but when I put it in the global map:pipelines context that's when things go
wrong as described. Do you use it in the global pipelines or in the a
map:pipeline ?
Thanks for the help
Regards
PS: you guys get our full support for the Tree structure widget, great idea,
loads of applications, we'll be there to use it, why not use javascript
Tree structures though?
Re: Error Handling, him or me ???
Posted by Sylvain Wallez <sy...@apache.org>.
oceatoon wrote:
>Hi devers
>here again after not finding an answer in user, sorry.
>
>My problem concerns using <map:handle-errors>
>It seems I must be doing something wrong, because on a simple not-found
>exeption, everything goes great...hmmm...he finds the file(error.html) I
>give in sitemap...but then when I visit a proper page the error.html page I
>had shown stays as a header of any new page...weird.
>
>Also Sometimes, some pages simply go blank ?? and I get a
>
>[java] 17:09:12.632 WARN!! Error for /cocoo ("my not found resource")
>[java] java.lang.StackOverflowError
>
>in console.
>offcourse all I have to do is comment out the <map:handle-errors> and all is
>fine again. so I ask myself is it bugged or am I ?
>I can't get it to be stable.
>Is anybody familiar with this problem ?
>has anybody managed to set up an error handler stabely?
>
>
Well, error handlers have been reported to be working fine for years...
Is the page where this problem occurs the main request, or is there some
surrounding environment such as aggregation, cocoon: et al?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://apache.org/~sylvain http://anyware-tech.com
Apache Software Foundation Member Research & Technology Director