You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Simon Hutchinson <si...@misgl.com> on 2004/06/10 16:16:41 UTC

Cant handle errors from Portal framework

Hi,

I have written a pipeline with the following error handler

<map:handle-errors>
	<map:select type="exception">					
		<map:when test="processing">
			<map:generate src="root.xml"/>
			<map:transform src="xsl/error.xsl">
				<map:parameter name="err" value="processing"/>
			</map:transform>
			<map:transform type="i18n"/>
			<map:serialize/>
		</map:when>
		<map:otherwise>
			<map:generate src="root.xml"/>
			<map:transform src="xsl/error.xsl">
				<map:parameter name="err" 	value="other"/>			
			</map:transform>
			<map:transform type="i18n"/>
			<map:serialize/>
		</map:otherwise>			
	</map:select>
</map:handle-errors>

ie If an exception thrown and it is a processing exception then the 
output will read "processing" otherwise the output will read "other"

When I navigate to this pipeline (designed to throw an exception) then 
the handle-errors section is invoked and my error message is returned.

However I have a coplet whose URI is this same pipeline, when the coplet 
call the pipeline the error is thrown but the handle-errors section is 
never entered and my error message is never thrown,

Could anyone shed any light on why the error handler is not entered when
the pipeline is called by a coplet and if possible how to correctly 
handle exceptions within the portal framework

Kind regards

Si
 
 
 
 
 
-- 
 
Merlin Information Systems Limited, 
 
Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN
 
Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112
 

 
http://www.misgl.com
 
Provider of IT Services and Online Portal Support Services. 
 
 
 
Confidentiality:
 
The information contained in this email (including any attachments) is confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the information in it by any other person is not authorised. If you are not the intended recipient, please notify us immediately by telephone or by e-mail to admin@misgl.com
 

 
 
 
*** This mail has been scanned for viruses ***
 

 

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


Re: Cant handle errors from Portal framework

Posted by Joerg Heinicke <jo...@gmx.de>.
On 10.06.2004 16:16, Simon Hutchinson wrote:

> Hi,
> 
> I have written a pipeline with the following error handler
> 
> <map:handle-errors>
>     <map:select type="exception">                   
>         <map:when test="processing">
>             <map:generate src="root.xml"/>
>             <map:transform src="xsl/error.xsl">
>                 <map:parameter name="err" value="processing"/>
>             </map:transform>
>             <map:transform type="i18n"/>
>             <map:serialize/>
>         </map:when>
>         <map:otherwise>
>             <map:generate src="root.xml"/>
>             <map:transform src="xsl/error.xsl">
>                 <map:parameter name="err"     value="other"/>           
>             </map:transform>
>             <map:transform type="i18n"/>
>             <map:serialize/>
>         </map:otherwise>           
>     </map:select>
> </map:handle-errors>
> 
> ie If an exception thrown and it is a processing exception then the 
> output will read "processing" otherwise the output will read "other"
> 
> When I navigate to this pipeline (designed to throw an exception) then 
> the handle-errors section is invoked and my error message is returned.
> 
> However I have a coplet whose URI is this same pipeline, when the coplet 
> call the pipeline the error is thrown but the handle-errors section is 
> never entered and my error message is never thrown,
> 
> Could anyone shed any light on why the error handler is not entered when
> the pipeline is called by a coplet and if possible how to correctly 
> handle exceptions within the portal framework

Coplet is an internal pipeline, isn't it? There are discussions how to
handle errors for internal pipelines correctly on the dev list. At the
moment it is not possible.

Joerg


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