new Object[] { TemplateEngine.threadIndex(), templateName, templateMode });
}
final ITemplateModeHandler templateModeHandler =
this.configuration.getTemplateModeHandler(templateMode);
final ITemplateWriter templateWriter = templateModeHandler.getTemplateWriter();
if (templateWriter == null) {
throw new ConfigurationException(
"No template writer defined for template mode \"" + templateMode + "\"");
}
try {
// It depends on the ITemplateWriter implementation to allow nulls or not.
// Standard writer will simply not write anything for null.
templateWriter.write(arguments, writer, document);
} catch (IOException e) {
throw new TemplateOutputException("Error during creation of output", e);
}
}