pee.getColumnNumber());
// Exception occurred merging template and model. It is possible
// that some output has already been written, so we will append the
// error report to the previous output.
ErrorReport errorReport =
new ErrorReport(te,
((page != null) ? page.getClass() : null),
configService.isProductionMode(),
Context.getThreadLocalContext().getRequest(),
configService.getServletContext());
if (velocityWriter == null) {
velocityWriter =
new VelocityWriter(writer, WRITER_BUFFER_SIZE, true);
}
velocityWriter.write(errorReport.toString());
throw te;
} catch (TemplateInitException tie) {
TemplateException te = new TemplateException(tie,
tie.getTemplateName(),
tie.getLineNumber(),
tie.getColumnNumber());
// Exception occurred merging template and model. It is possible
// that some output has already been written, so we will append the
// error report to the previous output.
ErrorReport errorReport =
new ErrorReport(te,
((page != null) ? page.getClass() : null),
configService.isProductionMode(),
Context.getThreadLocalContext().getRequest(),
configService.getServletContext());
if (velocityWriter == null) {
velocityWriter =
new VelocityWriter(writer, WRITER_BUFFER_SIZE, true);
}
velocityWriter.write(errorReport.toString());
throw te;
} catch (TemplateParseException tpe) {
TemplateException te = new TemplateException(tpe,
tpe.getTemplateName(),
tpe.getLineNumber(),
tpe.getColumnNumber());
// Exception occurred merging template and model. It is possible
// that some output has already been written, so we will append the
// error report to the previous output.
ErrorReport errorReport =
new ErrorReport(te,
((page != null) ? page.getClass() : null),
configService.isProductionMode(),
Context.getThreadLocalContext().getRequest(),
configService.getServletContext());
if (velocityWriter == null) {
velocityWriter =
new VelocityWriter(writer, WRITER_BUFFER_SIZE, true);
}
velocityWriter.write(errorReport.toString());
throw te;
} catch (Exception error) {
TemplateException te = new TemplateException(error);
// Exception occurred merging template and model. It is possible
// that some output has already been written, so we will append the
// error report to the previous output.
ErrorReport errorReport =
new ErrorReport(te,
((page != null) ? page.getClass() : null),
configService.isProductionMode(),
Context.getThreadLocalContext().getRequest() ,
configService.getServletContext());
if (velocityWriter == null) {
velocityWriter =
new VelocityWriter(writer, WRITER_BUFFER_SIZE, true);
}
velocityWriter.write(errorReport.toString());
throw te;
} finally {
if (velocityWriter != null) {