camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vero Kato <vero.ka...@gmail.com>
Subject Exception handling with Apache Camel
Date Sun, 06 Dec 2015 10:05:58 GMT
hi, I use Camel Rest and currently when I need to suppress exception in my
code and show on a screen nice message, I do like this:

onException(Exception.class).handled(true).setBody(constant("Parsing Error,
please check your input")).log("error sent back to client");

The only problem is that "error sent back to client" is not logged in our
log file, how to wire up my own logger into this? I also want to log
original exception message, how to reference original exception object
instance in this code?

Thanks,
Vero

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message