You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ralph Goers <Ra...@dslextreme.com> on 2005/03/12 00:44:21 UTC
Re: svn commit: r157153 - in cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap:
ErrorHandlerHelper.java PipelineNode.java PipelinesNode.java PipelinesNodeBuilder.java
Does this fix mean that handle-errors now works on internal pipelines as
well?
Ralph
vgritsenko@apache.org wrote:
>Author: vgritsenko
>Date: Fri Mar 11 12:47:16 2005
>New Revision: 157153
>
>URL: http://svn.apache.org/viewcvs?view=rev&rev=157153
>Log:
>Refactor sitemap error handling:
> * Encapsulate error handling details into ErrorHandlerHelper
> * Always log exception into handled-erorrs log, both in map:pipeline and map:pipelines
> * Error handling in map:pipelines gets same logic as in map:pipeline
>
>
>
Re: svn commit: r157153 - in cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap:
ErrorHandlerHelper.java PipelineNode.java PipelinesNode.java PipelinesNodeBuilder.java
Posted by Vadim Gritsenko <va...@reverycodes.com>.
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
Re: svn commit: r157153 - in cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap:
ErrorHandlerHelper.java PipelineNode.java PipelinesNode.java PipelinesNodeBuilder.java
Posted by Sylvain Wallez <sy...@apache.org>.
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?
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?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: svn commit: r157153 - in cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap:
ErrorHandlerHelper.java PipelineNode.java PipelinesNode.java PipelinesNodeBuilder.java
Posted by Vadim Gritsenko <va...@reverycodes.com>.
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.
Vadim
> Ralph
>
> vgritsenko@apache.org wrote:
>
>> Author: vgritsenko
>> Date: Fri Mar 11 12:47:16 2005
>> New Revision: 157153
>>
>> URL: http://svn.apache.org/viewcvs?view=rev&rev=157153
>> Log:
>> Refactor sitemap error handling:
>> * Encapsulate error handling details into ErrorHandlerHelper
>> * Always log exception into handled-erorrs log, both in map:pipeline
>> and map:pipelines
>> * Error handling in map:pipelines gets same logic as in map:pipeline