use of org.apache.camel.management.event.ExchangeFailedEvent in project camel by apache.
the class DebugExceptionEventBreakpointTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
breakpoint = new BreakpointSupport() {
public void onEvent(Exchange exchange, EventObject event, ProcessorDefinition<?> definition) {
AbstractExchangeEvent aee = (AbstractExchangeEvent) event;
Exception e = aee.getExchange().getException();
logs.add("Breakpoint at " + definition + " caused by: " + e.getClass().getSimpleName() + "[" + e.getMessage() + "]");
}
};
exceptionCondition = new ConditionSupport() {
public boolean matchEvent(Exchange exchange, EventObject event) {
return event instanceof ExchangeFailedEvent;
}
};
}
Aggregations