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/08/24 08:25:50 UTC

[jira] Created: (CAMEL-1929) ErrorHandler - handling exception using handled=true should expose the handled exception on exchange property

ErrorHandler - handling exception using handled=true should expose the handled exception on exchange property
-------------------------------------------------------------------------------------------------------------

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


When using

{code}
onException(Exception.class).handled(true).process(new MyErrorHandler());
{code}

The MyErrorHandler cannot see the original caused exception as you have marked it as handled.
We should expose that exception as a property

Either let it stay on
- {{Exchange.EXCEPTION_CAUGHT}}

Or introduce a new property
- {{Exchange.EXCEPTION_HANDLED}}

The former has the benefit its the same property all the time which may be the best solution. However it will stay on the Exchange for the remainder of the routing, unless end user removes it manually.

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


[jira] Updated: (CAMEL-1929) ErrorHandler - handling exception using handled=true should expose a flag its handled

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

Claus Ibsen updated CAMEL-1929:
-------------------------------

    Description: 
When using

{code}
onException(Exception.class).handled(true).process(new MyErrorHandler());

// or use

doTry()
   ...
doCatch(Exception.class).handled(true).process(new MyErrorHandler());
{code}

We should make it consistent that you can obtain the caused exception.

So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
- Exchange.EXCEPTION_CAUGHT contains the caused exception


  was:
When using

{code}
onException(Exception.class).handled(true).process(new MyErrorHandler());

// or use

doTry()
   ...
doCatch(Exception.class).handled(true).process(new MyErrorHandler());
{code}

We should make it consistent that there is a flag and that you can obtain the caused exception.

So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
- Exchange.EXCEPTION_CAUGHT contains the caused exception
- Exchange.FAILURE_HANDLED a boolean whether it was handled or not


> ErrorHandler - handling exception using handled=true should expose a flag its handled
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1929
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1929
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0-M3
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> When using
> {code}
> onException(Exception.class).handled(true).process(new MyErrorHandler());
> // or use
> doTry()
>    ...
> doCatch(Exception.class).handled(true).process(new MyErrorHandler());
> {code}
> We should make it consistent that you can obtain the caused exception.
> So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
> - Exchange.EXCEPTION_CAUGHT contains the caused exception

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


[jira] Updated: (CAMEL-1929) doCatch handled(true) should have access to caused exception just as onException has

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

Claus Ibsen updated CAMEL-1929:
-------------------------------

    Summary: doCatch handled(true) should have access to caused exception just as onException has  (was: ErrorHandler - handling exception using handled=true should expose a flag its handled)

> doCatch handled(true) should have access to caused exception just as onException has
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1929
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1929
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0-M3
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> When using
> {code}
> onException(Exception.class).handled(true).process(new MyErrorHandler());
> // or use
> doTry()
>    ...
> doCatch(Exception.class).handled(true).process(new MyErrorHandler());
> {code}
> We should make it consistent that you can obtain the caused exception.
> So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
> - Exchange.EXCEPTION_CAUGHT contains the caused exception

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


[jira] Resolved: (CAMEL-1929) doCatch handled(true) should have access to caused exception just as onException has

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

Claus Ibsen resolved CAMEL-1929.
--------------------------------

    Resolution: Fixed

trunk: 807109.

> doCatch handled(true) should have access to caused exception just as onException has
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1929
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1929
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0-M3
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> When using
> {code}
> onException(Exception.class).handled(true).process(new MyErrorHandler());
> // or use
> doTry()
>    ...
> doCatch(Exception.class).handled(true).process(new MyErrorHandler());
> {code}
> We should make it consistent that you can obtain the caused exception.
> So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
> - Exchange.EXCEPTION_CAUGHT contains the caused exception

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


[jira] Commented: (CAMEL-1929) ErrorHandler - handling exception using handled=true should expose a flag its handled

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53737#action_53737 ] 

Claus Ibsen commented on CAMEL-1929:
------------------------------------

Currently in 2.0 or lower the problem is that doCatch clears the Exchange.EXCEPTION_CAUGHT where as onException does not.
So this ticket is to make the two of them consistent.

> ErrorHandler - handling exception using handled=true should expose a flag its handled
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1929
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1929
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0-M3
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> When using
> {code}
> onException(Exception.class).handled(true).process(new MyErrorHandler());
> // or use
> doTry()
>    ...
> doCatch(Exception.class).handled(true).process(new MyErrorHandler());
> {code}
> We should make it consistent that there is a flag and that you can obtain the caused exception.
> So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
> - Exchange.EXCEPTION_CAUGHT contains the caused exception
> - Exchange.FAILURE_HANDLED a boolean whether it was handled or not

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


[jira] Updated: (CAMEL-1929) ErrorHandler - handling exception using handled=true should expose a flag its handled

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

Claus Ibsen updated CAMEL-1929:
-------------------------------

    Description: 
When using

{code}
onException(Exception.class).handled(true).process(new MyErrorHandler());

// or use

doTry()
   ...
doCatch(Exception.class).handled(true).process(new MyErrorHandler());
{code}

We should make it consistent that there is a flag and that you can obtain the caused exception.

So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
- Exchange.EXCEPTION_CAUGHT contains the caused exception
- Exchange.FAILURE_HANDLED a boolean whether it was handled or not

  was:
When using

{code}
onException(Exception.class).handled(true).process(new MyErrorHandler());
{code}

The MyErrorHandler cannot see the original caused exception as you have marked it as handled.
We should expose that exception as a property

Either let it stay on
- {{Exchange.EXCEPTION_CAUGHT}}

Or introduce a new property
- {{Exchange.EXCEPTION_HANDLED}}

The former has the benefit its the same property all the time which may be the best solution. However it will stay on the Exchange for the remainder of the routing, unless end user removes it manually.

     Issue Type: Improvement  (was: New Feature)
        Summary: ErrorHandler - handling exception using handled=true should expose a flag its handled  (was: ErrorHandler - handling exception using handled=true should expose the handled exception on exchange property)

> ErrorHandler - handling exception using handled=true should expose a flag its handled
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1929
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1929
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0-M3
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> When using
> {code}
> onException(Exception.class).handled(true).process(new MyErrorHandler());
> // or use
> doTry()
>    ...
> doCatch(Exception.class).handled(true).process(new MyErrorHandler());
> {code}
> We should make it consistent that there is a flag and that you can obtain the caused exception.
> So these properties on the Exchange should be the during the failure processor routing and what is returned to the client
> - Exchange.EXCEPTION_CAUGHT contains the caused exception
> - Exchange.FAILURE_HANDLED a boolean whether it was handled or not

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