зеркало из https://github.com/mozilla/pjs.git
Report parser errors when trying to compile the templates.
This commit is contained in:
Родитель
a8f0ac1190
Коммит
ae16e200a7
|
@ -66,7 +66,10 @@ sub process {
|
||||||
sub compile {
|
sub compile {
|
||||||
my $data = shift;
|
my $data = shift;
|
||||||
|
|
||||||
my $content = Template::Parser->new()->parse($data);
|
my $parser = Template::Parser->new();
|
||||||
|
my $content = $parser->parse($data);
|
||||||
|
|
||||||
|
die $parser->error() unless $content;
|
||||||
|
|
||||||
my ($block, $defblocks, $metadata) = @$content{ qw( BLOCK DEFBLOCKS METADATA ) };
|
my ($block, $defblocks, $metadata) = @$content{ qw( BLOCK DEFBLOCKS METADATA ) };
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче