* A strategy method to allow newly created processors to be wrapped in an
* error handler.
*/
protected Processor wrapInErrorHandler(RouteContext routeContext, Processor target) throws Exception {
ObjectHelper.notNull(target, "target", this);
ErrorHandlerWrappingStrategy strategy = routeContext.getErrorHandlerWrappingStrategy();
if (strategy != null) {
return strategy.wrapProcessorInErrorHandler(this, target);
}
return getErrorHandlerBuilder().createErrorHandler(routeContext, target);
}