有时,当我调试路由时,我看到交换异常,其他时候异常转到 CamelExceptionCaught 属性。它们之间有什么区别?
最佳答案
当错误处理程序处理异常时,它将异常从 exchange.getException 移动到 exchange 属性。这样做是为了让错误处理程序和 Camel 知道它已被处理。如果然后继续路由交换并且在交换上抛出/设置新的异常,则错误处理程序能够再次使用react。
请参阅此常见问题解答:http://camel.apache.org/why-is-the-exception-null-when-i-use-onexception.html
关于apache-camel - Apache Camel : exchange. getException() 与 CamelExceptionCaught 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37422568/