apache-camel - Apache Camel : exchange. getException() 与 CamelExceptionCaught 属性

标签 apache-camel

有时,当我调试路由时,我看到交换异常,其他时候异常转到 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/

相关文章:

java - 如何解决 Apache Camel 中的 "Failed to create route route1 exception"?

java - Apache Camel 日志

apache-camel - Camel Sftp - 下载多个文件

apache-camel - Apache Camel 拆分和聚合异常处理

memcached - 使用 apache Camel 缓存 http 请求

spring - 如何使 Camel 简单表达式与spring xml中的属性占位符一起使用

java - 使用 Apache Camel 并行处理多个文件

validation - 使用Camel中的Apache Validator组件进行XML验证

redis - Apache Camel Redis : AUTH option?

apache-camel - 使用 Camel @EndpointInject 构造函数依赖注入(inject)