You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Frankiboy <ma...@gmail.com> on 2014/06/13 11:51:56 UTC
Only want to print 10 lines stacktrace...
In my route i have this:
.onException(Exception.class).process(new Log()).end()
That calls this bean:
public class Log extends Exception implements Processor {
public static final String ROUTING_KEY = "datacentral";
@Override
public void process(Exchange exchange) throws Exception {
Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT,
Exception.class);
System.out.println("FJA Exchange: " + cause);
System.out.println("FJA Exchange1: " + cause.getStackTrace());
StackTraceElement[] stackTrace = cause.getStackTrace();
StackTraceElement[] test = new StackTraceElement[1];
cause.setStackTrace(test);
}
I want only to print the first 10 lines in the stacktrace, how is this
possible in camel ?
Frank
--
View this message in context: http://camel.465427.n5.nabble.com/Only-want-to-print-10-lines-stacktrace-tp5752257.html
Sent from the Camel - Users mailing list archive at Nabble.com.