You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/11/11 08:09:52 UTC

[jira] Created: (CAMEL-2158) onException - Should look up the hierarchy for exact matches to avoid being handled by Exception.class where an exact match existed

onException - Should look up the hierarchy for exact matches to avoid being handled by Exception.class where an exact match existed
-----------------------------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-2158
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2158
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0.0, 1.6.1
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.1.0


See nabble
http://old.nabble.com/Exception-handling-...-onException-to26215607.html

{code}
                onException(UnmarshalException.class).handled(true).to("mock:ue");
                
                onException(Exception.class).handled(true).to("mock:exception");

                from("direct:start")
                    .throwException(new UnmarshalException("Could not unmarshal", new IllegalArgumentException("Damn")));
{code}

The code above should be handled by the UnmarshalException.class as its the best candidate.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2158) onException - Should look up the hierarchy for exact matches to avoid being handled by Exception.class where an exact match existed

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2158.
--------------------------------

    Resolution: Fixed

trunk: 834801.

> onException - Should look up the hierarchy for exact matches to avoid being handled by Exception.class where an exact match existed
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2158
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2158
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> See nabble
> http://old.nabble.com/Exception-handling-...-onException-to26215607.html
> {code}
>                 onException(UnmarshalException.class).handled(true).to("mock:ue");
>                 
>                 onException(Exception.class).handled(true).to("mock:exception");
>                 from("direct:start")
>                     .throwException(new UnmarshalException("Could not unmarshal", new IllegalArgumentException("Damn")));
> {code}
> The code above should be handled by the UnmarshalException.class as its the best candidate.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.