public static CamelExecutionException wrapCamelExecutionException(Exchange exchange, Throwable e) {
if (e instanceof CamelExecutionException) {
// don't double wrap
return (CamelExecutionException)e;
} else {
return new CamelExecutionException("Exception occurred during execution", exchange, e);
}
}