camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-792) Exception is not logged or handled when error handler is LoggingErrorHandler and processing occurs inside Pipeline
Date Sat, 16 Aug 2008 06:03:52 GMT

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

Claus Ibsen commented on CAMEL-792:
-----------------------------------

Tomasz the mailing list is a good place if you are not sure its really a in issue or you need
help.
If you are pretty sure its a bug then please open a new JIRA ticket.

Glad you are looking into this and take time to report it. Digging into the code also helps
you understand how Camel works so you get some education as well ;)


> Exception is not logged or handled when error handler is LoggingErrorHandler and processing
occurs inside Pipeline
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-792
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-792
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>         Environment: camel-core-1.4.0.0-fuse. windows xp, java 6
>            Reporter: Tomasz Domzal
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: camel-792-logging-error-handler-test-case.patch.txt, camel-792-logging-error-handler.patch.txt,
ExceptionHandlingWithLoggingHanderAndPipelineTest.java
>
>
> Exception throw inside Pipeline is not reported or handled when error handler is LoggingErrorHandler.
> Attached unit test fails - exchange with exception is not passed to "mock:error" endpoints.
> Test will pass when you change error handler to default (DeadLetterErrorHandler)
> or when processor throwing an exception is processed not inside Pipeline.
> After some digging inside source code I noticed Pipeline source code fragment.
> {code:java}
>     public void process(Exchange exchange) throws Exception {
>         AsyncProcessorHelper.process(this, exchange);
>     }
> {code}
> AsyncProcessorHelper.process(..) never throws exception directly.
> Instead it passes exception information in exchange object properties.
> Problem is LoggingErrorHandler doesn't use it correctly because (code snipped from LoggingErrorHandler):
> {code:java}
>     public void process(Exchange exchange) throws Exception {
>         try {
>             output.process(exchange);
>         } catch (Throwable e) {
>             if (!customProcessorForException(exchange, e)) {
>                 logError(exchange, e);
>             }
>         }
>     }
> {code}
> it is logging only exception returned directly by output.process call.

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


Mime
View raw message