You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Aaron Whiteside (JIRA)" <ji...@apache.org> on 2014/10/24 18:49:34 UTC
[jira] [Comment Edited] (CAMEL-6406) Add support to
ObjectHelper.getException() for Java 1.7 Throwable.getSuppressed()
[ https://issues.apache.org/jira/browse/CAMEL-6406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14183030#comment-14183030 ]
Aaron Whiteside edited comment on CAMEL-6406 at 10/24/14 4:49 PM:
------------------------------------------------------------------
getSuppressed() is not the same thing as getCause(). Causes are chained, suppressed exceptions are well suppressed..
Typically you would call exception.addSuppressed( x ); this happens automatically with a try-with-resource block. Or more typically when you catch an exception and must close some resource who's close method also throws an exception, gone are the days when you would ignore that nested exception, now you can call addSuppressed() to the original exception.
was (Author: aaronjwhiteside):
getSuppressed() is not the same thing as getCause(). Causes are chained, suppressed exceptions are well suppressed..
Typically you would call exception.addSuppressed(x); this happens in with things like the try with resource block. Or more typically when you catch an exception and must close some resource that who's close method also throws an exception, gone are the days when you would ignore that nested exception, now you can call addSuppressed() to the original exception.
> Add support to ObjectHelper.getException() for Java 1.7 Throwable.getSuppressed()
> ---------------------------------------------------------------------------------
>
> Key: CAMEL-6406
> URL: https://issues.apache.org/jira/browse/CAMEL-6406
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.11.0, 2.14.0
> Reporter: Aaron Whiteside
> Assignee: Willem Jiang
>
> Add support to ObjectHelper.getException() for Java 1.7 Throwable.getSuppressed()
> Now that exceptions can be suppressed in Java 1.7 Camel should be able to detect when running in a 1.7 JVM and use the additional suppressed Throwables when searching for specific exception types.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)