cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Curran <>
Subject Return Error Code Based on Pipeline Content
Date Mon, 10 Apr 2006 02:51:50 GMT
Is it possible to return an error code based on the content in the pipeline?

What I have currently is something similar to the following -

<map:generate type="request"/>
<map:transform src="setupSqlQuery.xsl"/>
<map:transform type="sql"/>
<map:transform src="transformSqlResults.xsl"/>
<map:serialize type="xml"/>

What I would like to be able to do is examine the content of the sql 
transform and determine a success or failure of the operation. Based on 
this result I would like to be able to send an error.

If the operation was completed successfully I would like to send a 200 
status code, where as a failure might return a 500.

I originally thought that something like a selector where I could set 
the status code of the serialization, but selectors do not have access 
to the content of the pipeline.

What would be the best way to handle this type of logic. Is it possible 
in the sitemap? or should I look for a solution elsewhere?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message