[
https://issues.apache.org/jira/browse/CXF-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14219585#comment-14219585
]
Sergey Beryozkin commented on CXF-1819:
---------------------------------------
Hi, IMHO re-throwing RuntimeException but swallowing other exceptions does not
make it defensive, I think I dfid that change to ensure JAX-RS exception
mappers can be activated in such cases. I appreciate that it inadvertently led
to your problem appearing - but IMHO it should not be resolved by reverting
that "throw" I added. Hope a better solution would be found
Cheers, Sergey
> Make PhaseInterceptorChain.unwind() more defensive wrt handleFault()
> exceptions
> -------------------------------------------------------------------------------
>
> Key: CXF-1819
> URL: https://issues.apache.org/jira/browse/CXF-1819
> Project: CXF
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.1.1
> Reporter: Mike Quilleash
> Assignee: Daniel Kulp
> Fix For: 2.0.10, 2.1.4
>
>
> Currently the PhaseInterceptorChain.unwind() method looks like this (logging
> omitted)
> while (iterator.hasPrevious()) {
> Interceptor currentInterceptor = iterator.previous();
> currentInterceptor.handleFault(message);
> }
> It would be better to defend against an exception in handleFault() as
> currently an exception thrown from a handleFault() stops the unwind.
> New proposed code...
> while (iterator.hasPrevious()) {
> Interceptor currentInterceptor = iterator.previous();
> try {
> currentInterceptor.handleFault(message);
> catch (Exception e) {
> LOG.log( Level.ERROR, "Exception in handleFault on
> interceptor " + currentInterceptor, e);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)