You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2011/02/17 13:47:24 UTC

[jira] Created: (CXF-3344) Runtime Exceptions should not be wrapped. Exceptions should not be logged and rethrown in AbstractFaultChainInitiatorObserver

Runtime Exceptions should not be wrapped. Exceptions should not be logged and rethrown in AbstractFaultChainInitiatorObserver
-----------------------------------------------------------------------------------------------------------------------------

                 Key: CXF-3344
                 URL: https://issues.apache.org/jira/browse/CXF-3344
             Project: CXF
          Issue Type: Improvement
            Reporter: Christian Schneider


Currently the class org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver handles faults and sends them to a chain.
If in this chain another exception occurs then three things happen.

1) The exception is Wrapped in a RuntimeException
2) The exception is logged
3) The exception is rethrown

I propose to do the following instead :

1) Only Wrap the exception if it is no RuntimeException
2) Simply Rethrow and do not log as probably the Exception in caught and logged in another place anyway



-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (CXF-3344) Runtime Exceptions should not be wrapped. Exceptions should not be logged and rethrown in AbstractFaultChainInitiatorObserver

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider reassigned CXF-3344:
----------------------------------------

    Assignee: Christian Schneider

> Runtime Exceptions should not be wrapped. Exceptions should not be logged and rethrown in AbstractFaultChainInitiatorObserver
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3344
>                 URL: https://issues.apache.org/jira/browse/CXF-3344
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>
> Currently the class org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver handles faults and sends them to a chain.
> If in this chain another exception occurs then three things happen.
> 1) The exception is Wrapped in a RuntimeException
> 2) The exception is logged
> 3) The exception is rethrown
> I propose to do the following instead :
> 1) Only Wrap the exception if it is no RuntimeException
> 2) Simply Rethrow and do not log as probably the Exception in caught and logged in another place anyway

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CXF-3344) Runtime Exceptions should not be wrapped. Exceptions should not be logged and rethrown in AbstractFaultChainInitiatorObserver

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995796#comment-12995796 ] 

Christian Schneider commented on CXF-3344:
------------------------------------------

The current block of code is this:
try {
    chain.doIntercept(faultMessage);
} catch (Exception exc) {
    LOG.log(Level.SEVERE, "Error occurred during error handling, give up!", exc);
    throw new RuntimeException(exc);
}

As chain does not throw checked exceptions and I would like to only rethrow and not log we could simply skip the handling:

chain.doIntercept(faultMessage);

What do you others think? Did I overlook something or can it be that simple


> Runtime Exceptions should not be wrapped. Exceptions should not be logged and rethrown in AbstractFaultChainInitiatorObserver
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3344
>                 URL: https://issues.apache.org/jira/browse/CXF-3344
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>
> Currently the class org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver handles faults and sends them to a chain.
> If in this chain another exception occurs then three things happen.
> 1) The exception is Wrapped in a RuntimeException
> 2) The exception is logged
> 3) The exception is rethrown
> I propose to do the following instead :
> 1) Only Wrap the exception if it is no RuntimeException
> 2) Simply Rethrow and do not log as probably the Exception in caught and logged in another place anyway

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira