【发布时间】:2017-09-07 21:23:04
【问题描述】:
我很难理解如何将存储在正文中的变量作为 throwException 的参数传递。 这是我的代码:
.when(simple("${body[errorCode]} contains '101'"))
.throwException(new IllegalArgumentException(
"Action not allowed- Error code:" + ${body[errorCode]))
.otherwise()
当我运行应用程序时,传递给 ErrorHandling 的消息是
'Action not allowed- Error code:${body[errorCode]', no replacing for errorCode variable.
有什么建议吗? Tnks。
【问题讨论】:
标签: exception apache-camel custom-error-handling