-
1. Re: Exception handling spring
davsclaus Feb 21, 2011 11:24 AM (in response to nohaapav)The caught exception is stored as a property on the Exchange. You can grab it using exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
Chapter 5 in the Camel book covers error handling very detailed. You may find information reading the Dead Letter Channel EIP
http://fusesource.com/docs/router/2.5/eip/index.html
Or scattered information at the Camel wiki pages
http://camel.apache.org/error-handling-in-camel.html
The EXCEPTION_CAUGHT works with bean binding, so just invoke a bean in the doCatch block and put a (Exception cause) in the method signature.
-
2. Re: Exception handling spring
nohaapav Feb 21, 2011 11:36 AM (in response to davsclaus)Now i tried to use something like :
public class UnsupportedXmlSchema extends Exception {
public final static Logger logger = LoggerFactory.getLogger(UnsupportedXmlSchema.class);
public void unsupportedXmlSchema(Exception ex) {
logger.info(ex.getCause().toString());
}
}
and works perfect so sorry for spam .. i'm a little bit overloaded seems to be ) .. and thanks of course ..
-
3. Re: Exception handling spring
ffang Feb 21, 2011 11:09 PM (in response to nohaapav)Hi Pavol,
Just one note,
If I understand correctly, this question is FUSE Mediation Router(Apache Camel) related only, but not FUSE Services Framework(Apache Cxf) related, would you please post such questions to correct forum category later on, it's better for track.
Thanks
Freeman