Xilai Dai created CAMEL-12318:
---------------------------------

             Summary: Exception from aggregate() of AggregationStrategy has 
been hiden since Camel 2.16.x
                 Key: CAMEL-12318
                 URL: https://issues.apache.org/jira/browse/CAMEL-12318
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.20.2, 2.16.5
         Environment: Java 8
            Reporter: Xilai Dai


In case of any exception thrown from aggregate() of the custom 
AggregationStrategy class, the exception is hiden by Camel core and couldn't be 
catched by any errorhandler.

A simple use case project is created for easy reproduce this issue, 
https://github.com/xldai/test/tree/master/test-multicast

With setting camel.ver to 2.15.x in the pom.xml, the Exception is thrown as 
expected:
{code:java}
Caused by: java.lang.RuntimeException: Deliberate Exception
        at 
beans.FD_MulticastAggregator.aggregate(FD_MulticastAggregator.java:16)
        at 
org.apache.camel.processor.MulticastProcessor.doAggregateInternal(MulticastProcessor.java:848)
        at 
org.apache.camel.processor.MulticastProcessor.doAggregate(MulticastProcessor.java:830)
        at 
org.apache.camel.processor.MulticastProcessor$AggregateOnTheFlyTask.aggregateOnTheFly(MulticastProcessor.java:489)
        at 
org.apache.camel.processor.MulticastProcessor$AggregateOnTheFlyTask.run(MulticastProcessor.java:394){code}
With setting camel.ver to higher than 2.16.x in the pom.xml, the Exception is 
not exposed anymore.

Looking into the commit changes, seems this is happening after the changes of 
CAMEL-8587.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to