I have a custom exception class, customException, which when called is needing three parameters (two integers and String).
Currently in my camel.xml file I have:
<onException>
<exception>org.apache.camel.http.common.HttpOperationFailedException</exception>
<throwException exceptionType="package.path.of.customException" message="custom message" />
</onException>
When the exception is thrown, specific variable(s) I want is null. How could set that variable within Camel? is it possible?
You can define your exception as a separate bean with custom constructor arguments and property values, and reference it from
throwException
: