[TwigBundle] added correct file name in twig:lint exception reporting
This commit is contained in:
parent
57c6aaa397
commit
a11ec3e71c
@ -90,8 +90,8 @@ EOF
|
|||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
try {
|
try {
|
||||||
$twig->parse($twig->tokenize(file_get_contents($file)));
|
$twig->parse($twig->tokenize(file_get_contents($file)));
|
||||||
} catch (\Exception $e) {
|
} catch (\Twig_Error $e) {
|
||||||
$output->writeln(sprintf('<error>Syntax error in %s</error>', $file));
|
$e->setTemplateFile((string) $file);
|
||||||
|
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user