cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: [Portal] Why don't cocoon errors appear in a coplet ?
Date Wed, 03 Mar 2004 08:44:47 GMT
Hi,

the answer isn't related to the portal but to the Cocoon sitemap
engine: The portal uses internal pipeline calls (cocoon: protocol).
Whenever Cocoon uses an internal pipeline call, the error handler
of that pipeline is never invoked, so if you do a

<map:generate src="cocoon:/my-pipeline"/>

and there is an error in your "my-pipeline", the error handler
of "my-pipeline" is never invoked. In the case above the 
error handler of the pipeline containing the map:generate is
invoked.

In the case of the portal, the error is "ignored". You can specify
for each coplet an alternative pipeline that is invoked if the 
real content pipeline throws an error. Have a look at the
configuration of the coplet showing my weblog. That coplet shows
the "real" content from the net if you have a network connection,
if not a static (old) xml file is read.

HTH
Carsten

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Olivier Billard
> Sent: Tuesday, March 02, 2004 6:25 PM
> To: dev@cocoon.apache.org
> Subject: [Portal] Why don't cocoon errors appear in a coplet ?
> 
> Hi cocooners !
> 
> I posted in the users' but maybe some sitemap gurus can show 
> me the light ;).
> 
> I use the portal for a project and i'm not able to display 
> errors in a (main) coplet.
> I always have a blank content, as if when rendering the 
> content of the coplet, the error content is not put in the 
> whole portal page.
> 
> I tried xml-serializing, html-serializing errors :
> 
>      <map:handle-errors>
>        <map:select type="exception">
> 
>          <map:when test="not-found">
>            <map:generate type="notifying"/>
>            <map:transform src="stylesheets/system/error2html.xslt">
>              <map:parameter name="contextPath" 
> value="{request:contextPath}"/>
>              <map:parameter name="pageTitle" value="Resource 
> not found"/>
>            </map:transform>
>            <map:serialize status-code="404"/>
>          </map:when>
> 
>          <map:when test="invalid-continuation">
>            <map:generate src="not-found.xml"/>
>            <map:transform src="welcome.xslt">
>              <map:parameter name="contextPath" 
> value="{request:contextPath}"/>
>            </map:transform>
>            <map:serialize status-code="404"/>
>          </map:when>
> 
>          <map:otherwise>
>            <map:generate type="notifying"/>
>            <map:transform src="stylesheets/system/error2html.xslt">
>              <map:parameter name="contextPath" 
> value="{request:contextPath}"/>
>            </map:transform>
>            <!--map:serialize status-code="500"/-->
> --->      <map:serialize type="html"/>
>          </map:otherwise>
>        </map:select>
> 
>      </map:handle-errors>
> 
> (map:otherwise is choosen, i tried renaming the transformer 
> src attribute)
> 
> But no way : I have no content in the coplet...
> I can right display the error when calling the coplet pipe, 
> but it' empty in the portal page...
> 
> It seems to work like standard/error output : when an error 
> occurs, the standard sitemap output is empty, and the sitemap 
> error output contains the error catched in the map:handle-errors.
> 
> Thanks in advance for your answers !
> 
> --
> Olivier BILLARD
> 
> 


Mime
View raw message