[
https://issues.apache.org/jira/browse/CAMEL-6406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14183030#comment-14183030
]
Aaron Whiteside commented on CAMEL-6406:
----------------------------------------
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)