Fix the error handling of compiled templates
git-svn-id: svn://10.0.0.236/trunk@139427 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ba35e2f60a
commit
8d5a9a0bea
@ -64,7 +64,9 @@ sub expand {
|
||||
# what we have here is a potential Template::Document
|
||||
# let's try to evaluate it
|
||||
$document = eval $string;
|
||||
$self->assert((not defined($@)), 1, "Error loading compiled template: $@");
|
||||
if ($@) {
|
||||
$self->error(1, "Error loading compiled template: $@");
|
||||
}
|
||||
} else { # $type eq 'TemplateToolkit'
|
||||
# what we have is a raw string
|
||||
$document = \$string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user