Barry McMullin wrote:

>On Tue, 17 Sep 2002, Antonio Gallardo Rivera wrote:
>
>  
>
>>You need the <map:handle-errors> element inside your pipeline, for example:
>>
>><map:handle-errors>
>>        <map:transform src="stylesheets/system/error2document.xsl"/>
>>        <map:transform src="stylesheets/apache.xsl"/>
>>        <map:serialize status-code="500"/>
>></map:handle-errors>
>>    
>>
>
>I don't *think* so ... but I am open to correction.
>
>The problem, as I see it, is that no exception or failure is
>being raised in the relevant <map:match> *at all* (in the case of
>doing an aggregation, and only one part is missing) - so there is
>nothing to trigger a <map:handle-errors>.
>
>But, for the record, I just added a degenerate:
>

In your case I would add:


>  <map:handle-errors type="404">
>   <map:serialize status-code="500"/>
>  </map:handle-errors>
>

(note @type).


>to the pipeline, and it makes no apparent difference to the behaviour.
>
>(As an aside: my understanding is that cocoon would only
>"automatically" generate a 404 status when no matcher is found
>for the URI at all - is that right?)
>

No. type="404" handler is used for any ResourceNotFoundException 
handling too (try throwing it in the action or among the first lines of 
XSP :)

Vadim


>Best,
>
>- Barry.
>  
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to