[
https://issues.apache.org/activemq/browse/CAMEL-792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44968#action_44968
]
Tomasz Domzal commented on CAMEL-792:
-------------------------------------
I was still working on this but you ware faster :)
BWT. I'm digging a little bit more around LoggingErrorHandler and found some
issues directly related to modified error handler fragment. Should I report it
here or rather on mailing list ?
> 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.