Display error when Smarty throws an exception (fixes #130)

This commit is contained in:
Pierre Rudloff 2017-10-02 21:07:13 +02:00
parent 3e13be702e
commit 2cfe90bd2d
1 changed files with 6 additions and 1 deletions

View File

@ -55,4 +55,9 @@ $app->get(
'/locale/{locale}',
[$controller, 'locale']
)->setName('locale');
$app->run();
try {
$app->run();
} catch (\SmartyException $e) {
die('Smarty could not compile the template file: '.$e->getMessage());
}