[jira] Created: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
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
            Reporter: Dan Dudley
         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41907#action_41907 ]

Claus Ibsen commented on CAMEL-410:
-----------------------------------

Dan could you re attach you patch with the license to ASF granted.
We can not apply patches that we do not hold rights for.

When you attach a file to an existing ticket there is a tick box to grant this license.

> 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
>             Fix For: 1.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-410:
------------------------------

        Fix Version/s: 1.4.0
    Affects Version/s: 1.2.0
                       1.3.0

> 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
>             Fix For: 1.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Dudley updated CAMEL-410:
-----------------------------

    Attachment:     (was: patch.txt)

> 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
>             Fix For: 1.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Dudley updated CAMEL-410:
-----------------------------

    Attachment: patch.txt

> 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
>             Fix For: 1.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-410:
---------------------------------

    Assignee: Claus Ibsen

> 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.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41956#action_41956 ]

Claus Ibsen commented on CAMEL-410:
-----------------------------------

Dan do you have a snippet of your camel context cofiguration where you have the exceåtions configured.

I would like to create a unit test that tests this problem.

Looking at the ErrorHandlerSupport code it would use the first found Exception that isInstanceof so it could potentially find a less specific type exception that was not the best suited.

> 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.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41969#action_41969 ]

Dan Dudley commented on CAMEL-410:
----------------------------------

That's the problem we are experiencing.  The camel context configuration only encounters this problem sometimes.  I would be more than happy to make a unit test to prove that this is a problem, but it seems to be...impossible since the IdentityHashMap is ignoring the hashcode method and is going directly to a native method to resolve the hashcode.

If you discover a way to test this and get it consistently to fail I would like to see how you did it.

> 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.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Dudley updated CAMEL-410:
-----------------------------

    Attachment: ErrorHandlerSupportTest.java

Here is the unit test I was working on.  It was consistently failing for me, but you may see different results. :0(

> 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.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41972#action_41972 ]

Claus Ibsen commented on CAMEL-410:
-----------------------------------

Thanks Dan for the unit test.

I was also looking for a camel context configuration eg. with the fluent builder (DSL) that demonstrates the use-case with configuration using several exceptions and an exchange between endpoints etc.

Dan if you have relevant parts of the camel context configuration in question that only encounters the problem sometimes, then please attach this material also.

> 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.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Work started: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-410 started by Claus Ibsen.

> 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.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41981#action_41981 ]

Claus Ibsen commented on CAMEL-410:
-----------------------------------

Dan I can not get the unit test to fail on my system.

However I do think we need an example using the DSL configuration to see how the ExecptionType configures the DeadLetterChannel that extends the ErrorHandlerSupport.
So this is why I am calling for your camel route configuration that only encounters this problem sometimes.

> 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.4.0
>
>         Attachments: 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Dudley updated CAMEL-410:
-----------------------------

    Attachment: BaseRouteBuilder.java

This is our base RouteBuilder that sets up the general error handling.

> 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.4.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41996#action_41996 ]

Claus Ibsen commented on CAMEL-410:
-----------------------------------

Dan, thanks for the new attachment. I can reproduce the bug here. Camel pick ups java.lang.Exception at first even though there is a exact match such as NPE.

> 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.4.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41997#action_41997 ]

Claus Ibsen commented on CAMEL-410:
-----------------------------------

I got something better now that finds the best suited exception type configured for the given thrown exception.

The code need a little polishing and some more testing.

> 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.4.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-410:
------------------------------

    Fix Version/s: 1.3.0
                       (was: 1.4.0)

Target for 1.3 release

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-410:
------------------------------

    Fix Version/s: 1.4.0
                       (was: 1.3.0)

Moving it to 1.4 release.

1.3 is about to be released really soon.

> 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.4.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-410) Exception handling of the ErrorHandlerSupport class

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-410.
-------------------------------

    Resolution: Fixed

Fixed in trunk now wtih wiki documentation at Error Handler and Dead Letter Channel.

See also the unit tests for details etc.

> 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.4.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.