cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceatoon <t.katelb...@systheo.com>
Subject Error Handling, him or me ???
Date Mon, 09 May 2005 09:17:04 GMT
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>


Mime
View raw message