1
選擇塊在下面的代碼,任何人都可以請解釋doTry做什麼選擇塊,爲什麼它不趕RuntimeCamelException?異常處理駱駝 - 在doTry
<doTry>
<process ref="msgProcessor" />
<choice>
<when>
<simple>"false" == "true" && ${exchangeProperty.status} == ${ref:SUCCESS}</simple>
<process ref="queryProcessor" />
</when>
</choice>
<choice>
<when>
<simple>"false" == "true" && ${exchangeProperty.status} == ${ref:SUCCESS}</simple>
<process ref="compareProcessor" />
</when>
</choice>
<doCatch>
<exception>org.apache.camel.RuntimeCamelException</exception>
<exception>java.lang.Exception</exception>
</doCatch>
</doTry>
我仍然得到以下異常:
org.apache.camel.RuntimeCamelException: Scanner aborted because of an IOException!
at org.apache.camel.processor.Splitter$SplitterIterable$1.hasNext(Splitter.java:171)
at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:268)
at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:225)
at org.apache.camel.processor.Splitter.process(Splitter.java:104)
我有類似的問題。它看起來像.doTry()和.choice()不能很好地一起玩。 –