Bug 119657 - template error checking

r=gerv, justdave
parent d0e08d06
......@@ -1584,7 +1584,7 @@ use Template;
# Create the global template object that processes templates and specify
# configuration parameters that apply to all templates processed in this script.
$::template = Template->new(
$::template ||= Template->new(
{
# Colon-separated list of directories containing templates.
INCLUDE_PATH => "template/custom:template/default" ,
......@@ -1596,6 +1596,9 @@ $::template = Template->new(
PRE_CHOMP => 1 ,
TRIM => 1 ,
COMPILE_EXT => ".ttc",
COMPILE_DIR => "data/templates",
# Functions for processing text within templates in various ways.
FILTERS =>
{
......@@ -1614,7 +1617,8 @@ $::template = Template->new(
}
} ,
}
);
) || DisplayError("Template creation failed: " . Template->error())
&& exit;
# Use the Toolkit Template's Stash module to add utility pseudo-methods
# to template variables.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment