public final void process(
final ITemplateContext context,
final IProcessableElementTag tag,
final IElementTagStructureHandler structureHandler) {
try {
doProcess(context, tag, structureHandler);
} catch (final TemplateProcessingException e) {
if (tag.hasLocation()) {
if (!e.hasTemplateName()) {
e.setTemplateName(tag.getTemplateName());
}
if (!e.hasLineAndCol()) {
e.setLineAndCol(tag.getLine(), tag.getCol());
}
}
throw e;
} catch (final Exception e) {
throw new TemplateProcessingException(
"Error during execution of processor '" + this.getClass().getName() + "'",
tag.getTemplateName(), tag.getLine(), tag.getCol(), e);
}
}