camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrè <>
Subject Re: Is it possible to propagate an exception to the parent route?
Date Fri, 01 Jul 2011 16:06:40 GMT
i´m trying that by wrapping an exception in a RuntimeCamelException and the
exception consumer is dewraping and throwing it again, 
but at the producer i´m getting a nullpointer, so somewhere i´m loosing the
exception, cause i should get the runtimecamelException ...

any ideas ? 
(thx, your answers already helped that much.. )
(Exception producer)
			<log message=" Xacml request consumed" />
				<to uri="bean:pdp" />
					<process ref="ExceptionWrapper"/>
	public void process(Exchange exchange) throws Exception {
		Exception e = exchange.getException();
		RuntimeCamelException wrapper = new RuntimeCamelException(e.getCause());


(Exception consumer)
			<from uri="direct:AuthzService" />
			<to uri="bean:isAuthZBlocked?method=checkRequest" />
					<process ref="ExceptionDeWrapper" />

	public void process(Exchange exchange) throws Exception {
		throw exchange.getException(); 

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message