You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Philippe Guillard <pg...@citycita.net> on 2005/04/22 10:59:43 UTC

Error handling / external resource

Hi,

Is it possible to handle error when an external resource is not available?
This is what i tried for now without success:

<map:match pattern="foo">
    <map:act type="resource-exists">
        <map:parameter name="url" value="http://www.foo.org"/>
         <map:generate type="html" src="http://www.foo.org">
        <map:serialize type="xhtml"/> 
    </map:act>
    <map:generate src="notavailable.xml"/>
    <map:serialize type="xml"/> 
</map:match>
.....
   <map:handle-errors>
    <map:transform src="common/style/xsl/html/error2html.xsl"/>
    <map:serialize type="html" status-code="500"/>
   </map:handle-errors>   

Regards,

Phil



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org