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:
ian%hixie.ch 2003-03-14 03:59:29 +00:00
parent ba35e2f60a
commit 8d5a9a0bea

View File

@ -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;