Ejemplo n.º 1
0
 public void setException(Throwable t) {
   if (t == null) {
     this.exception = null;
   } else if (t instanceof Exception) {
     this.exception = (Exception) t;
   } else {
     // wrap throwable into an exception
     this.exception = ObjectHelper.wrapCamelExecutionException(this, t);
   }
 }
Ejemplo n.º 2
0
 private Expression createExpression(Exchange exchange) {
   SimpleLanguage simple = (SimpleLanguage) exchange.getContext().resolveLanguage("simple");
   // resolve property placeholders
   try {
     String resolve = exchange.getContext().resolvePropertyPlaceholders(text);
     return simple.createExpression(resolve, resultType);
   } catch (Exception e) {
     throw ObjectHelper.wrapCamelExecutionException(exchange, e);
   }
 }