public final ProcessorResult process( final Arguments arguments, final ProcessorMatchingContext processorMatchingContext, final Node node) { try { return doProcess(arguments, processorMatchingContext, node); } catch (final TemplateProcessingException e) { if (!e.hasTemplateName()) { e.setTemplateName(node.getDocumentName()); } if (!e.hasLineNumber()) { e.setLineNumber(node.getLineNumber()); } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", node.getDocumentName(), node.getLineNumber(), e); } }