[
https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42000#action_42000
]
Claus Ibsen commented on CAMEL-410:
-----------------------------------
I am introducing a strategy to resolve which is the best exception type to
handle the thrown exception in questions. The default strategy will be to use
the exception that is the closets match to the thrown exception.
eg. java.net.ConnectionException will match java.io.IOException
eg. CamelExchangeException will match CamelException
eg. MyBusinessException will match MyBaseBusinessException
eg. NullPointerException will match Exception
Well you might get the picture.
A different strategy could be to use the ordering of how the exceptions was
configured. Use the fist match that can handle it etc (top-down).
> Exception handling of the ErrorHandlerSupport class
> ---------------------------------------------------
>
> Key: CAMEL-410
> URL: https://issues.apache.org/activemq/browse/CAMEL-410
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.2.0, 1.3.0
> Reporter: Dan Dudley
> Assignee: Claus Ibsen
> Fix For: 1.3.0
>
> Attachments: BaseRouteBuilder.java, ErrorHandlerSupportTest.java,
> patch.txt
>
>
> When you configure your route builder and say you want to configure two
> exceptions lets say: NullPointer and Exception.
> Now say the bean you call as your end point throws a NullPointer, wouldn't
> you think the NullPointer policy would handle that exception?
> Well I'm seeing sometimes it does and sometimes it doesn't due to the map not
> keeping the exceptions in any particular order. Is there anyway this could
> be changed to a LinkedHashMap or a List?
> Issue with class: org.apache.camel.processor.ErrorHandlerSupport
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.