-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dear list,
I seem to be stuck with my attempt to handle errors in my pipeline.
It appears they are not called in the sub-sitemap.
Here is my 2.1.9 configuration:
- --- selector in standard sitemap.xmap --> just added the
"file-not-found" ---
<!--+
| Exception selector : used in <map:handle> errors to build
different pipelines
| depending on the error that occured.
| The configuration allows to associate a symbolic name to
exception classes
| which is used in the <map:when> tests.
| An exception can also be "unrolled", meaning that cascaded
exception will be checked.
+-->
<map:selector logger="sitemap.selector.exception" name="exception"
src="org.apache.cocoon.selection.ExceptionSelector">
<exception class="java.io.FileNotFoundException"
name="file-not-found"/>
<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>
- --- in my mounted my-app.xmap ---
<map:pipeline>
<map:match pattern="/*.xml">
<map:generate src="xdocs/{1}.xml"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="**.xml">
<map:generate src="xdocs/{1}.xml"/>
<map:serialize type="xml"/>
</map:match>
<map:handle-errors>
<map:select type="exception">
<map:when test="not-found">
<!--
<map:generate
src="cocoon:/glosary-term-not-found.xml"/>
<map:transform type="idgen" label="id"/>
<map:transform
src="resources/stylesheets/site2xhtml.xsl" label="xhtml">
<map:transform type="xinclude" label="include"/>
<map:parameter name="path" value="/"/>
<map:parameter name="page"
value="glossary-term-not-found"/>
</map:transform>
<map:transform type="linkrewriter"
src="cocoon:/linkmap-glossary-term-not-found" label="rewritten"/>
<map:serialize status-code="404"/>
- -->
<map:generate type="exception"/>
<map:transform src="stylesheets/system/exception2html.xslt">
<map:parameter name="contextPath"
value="{request:contextPath}"/>
<map:parameter name="realPath" value="{realpath:}"/>
<map:parameter name="pageTitle" value="Resource not found
... my-app xml pipeline"/>
</map:transform>
<map:serialize status-code="404"/>
</map:when>
<map:when test="file-not-found">
<!--
<map:generate
src="cocoon:/glosary-term-not-found.xml"/>
<map:transform type="idgen" label="id"/>
<map:transform
src="resources/stylesheets/site2xhtml.xsl" label="xhtml">
<map:transform type="xinclude" label="include"/>
<map:parameter name="path" value="/"/>
<map:parameter name="page"
value="glossary-term-not-found"/>
</map:transform>
<map:transform type="linkrewriter"
src="cocoon:/linkmap-glossary-term-not-found" label="rewritten"/>
<map:serialize status-code="404"/>
- -->
<map:generate type="exception"/>
<map:transform src="stylesheets/system/exception2html.xslt">
<map:parameter name="contextPath"
value="{request:contextPath}"/>
<map:parameter name="realPath" value="{realpath:}"/>
<map:parameter name="pageTitle" value="Resource not found
... my-app xml pipeline"/>
</map:transform>
<map:serialize status-code="404"/>
</map:when>
</map:select>
</map:handle-errors>
</map:pipeline>
- ---------
Is there anything obviously wrong with that? It appears that always the
error handling from the main webapp/sitemap.xmap is used. Even when I
remove that it is replaced with some default "Error ..." handler.
Is this some new behavior in 2.1.9? Is the documentation of the
error-handler hierarchy still correct?
Thanks
Kaj
- --
[EMAIL PROTECTED]
- -----------------------------------------------------
| We produce animated software manuals that click |
- -----------------------------------------------------
Conficio
http://www.conficio.com/
P.O.Box 761062, Melrose,
MA 02176
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
iD8DBQFEcdxVRDUvrJRNjTARAiG3AKCblB+TIPGz1E7DVzNK8i/9HnS1cwCeJ+s/
7oWLaPBfo3hNi0rUrGAJoMU=
=6+J3
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]