Sylvain Wallez wrote:
Vadim Gritsenko wrote:

Ralph Goers wrote:

Does this fix mean that handle-errors now works on internal pipelines as well?


No, not yet, I need couple of more days. But it means that:

  <map:pipelines>
    <map:pipeline>
      ...
      <map:handle-errors/> (1)
    </map:pipeline>
    <map:handle-errors/> (2)
  </map:pipelines>

(2) is now behaving more like (1). Before, I noticed it did not log an error into handled-error log, did not handle ConnectionResetException, etc.


Sorry, I may have missed something as I never heard of (2). When is it triggered?

If you remember, exception "traverses" error handlers up the invocation tree till it finds the handler which can process exception. So, (2) will be triggered if (1) is missing or did not process an exception. Behaviour is very similar to java exception catch block processing.


I see that this feature was introduced before 2.1m1 release [1]. See also [2], [3] for samples showing this off.


Also, when no match is found, the <handle-errors> of the last <map:pipeline> was used to handle the ResourceNotFound. Is this still the case?

Yes.

Vadim

[1] http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/PipelinesNodeBuilder.java?r1=1.1&r2=1.2&diff_format=h
[2] http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/errorhandling/exception/sitemap.xmap
[3] http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/errorhandling/sitemap.xmap

Reply via email to