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/05/18 05:24:47 UTC

Error handling for portal coplets ?

Hi all,

Is it possible to use sitemap error handling in coplet contents ? How?

I have a cachingURI coplet that gets information from another servlet. 
If this information is not available i want to give information to the 
user instead of the "The coplet XXXX is currently not available.".

I handle error java.io.IOException exception in the sitemap like this OK :
<map:pipeline>
    <map:match pattern="external">
            <map:generate type="html" src="http://external-file"/>
            <map:serialize type="xhtml"/>
    </map:match>
    <map:handle-errors>
            <map:generate src="notavailable.xml"/>
            <map:serialize/>
    </map:handle-errors>   
</map:pipeline>

Then i put this in a cachingURI coplet, this is the temporaryUri pipeline :
<map:match pattern="application-external">
    <map:generate 
src="{coplet:temporaryAttributes/application-uri}?copletid={coplet:#}"/>
    <map:transform type="xslt" src="cleanhtml.xsl"/>
    <map:transform type="portal-html-eventlink">
        <map:parameter name="attribute-name" value="application-uri"/>     
    </map:transform>
    <map:serialize type="xml"/>
</map:match>  

If the file is not found i don't get my error handled, but the usual 
message :
The coplet external-1 is currently not available.

Regards,

Phil

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


Re: Error handling for portal coplets ?

Posted by Philippe Guillard <pg...@citycita.net>.
Ok i've found a thread saying that a coplet pipeline is internal (don't 
see where it is mentioned internal) and that Internal Pipelines Error 
Handling is not disponible in 2.1.6 (new feature in 2.1.7).


Philippe Guillard wrote:

> Hi all,
>
> Is it possible to use sitemap error handling in coplet contents ? How?
>
> I have a cachingURI coplet that gets information from another servlet. 
> If this information is not available i want to give information to the 
> user instead of the "The coplet XXXX is currently not available.".
>
> I handle error java.io.IOException exception in the sitemap like this 
> OK :
> <map:pipeline>
>    <map:match pattern="external">
>            <map:generate type="html" src="http://external-file"/>
>            <map:serialize type="xhtml"/>
>    </map:match>
>    <map:handle-errors>
>            <map:generate src="notavailable.xml"/>
>            <map:serialize/>
>    </map:handle-errors>   </map:pipeline>
>
> Then i put this in a cachingURI coplet, this is the temporaryUri 
> pipeline :
> <map:match pattern="application-external">
>    <map:generate 
> src="{coplet:temporaryAttributes/application-uri}?copletid={coplet:#}"/>
>    <map:transform type="xslt" src="cleanhtml.xsl"/>
>    <map:transform type="portal-html-eventlink">
>        <map:parameter name="attribute-name" 
> value="application-uri"/>        </map:transform>
>    <map:serialize type="xml"/>
> </map:match> 
> If the file is not found i don't get my error handled, but the usual 
> message :
> The coplet external-1 is currently not available.
>
> Regards,
>
> Phil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>


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