Opinion...
IMHO, you should try and use a camel as a declarative language. I always find "try ... catch" dsl too mandatory
handle[MyException] {
log("handling exception")
process((e : Exchange) => e.in = "an error occured")
}.handled
"jetty:http://localhost:9091/service" ==> {
id ("some-error-route")
log("processing request")
process((e : Exchange) => e.in = e.in[String].reverse)
process((_: Exchange) => throw new MyException("Something went wrong"))
log("done")
}
.