From 2cfe90bd2da1d3075ddf60d955f6217f57e22a7c Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 2 Oct 2017 21:07:13 +0200 Subject: [PATCH] Display error when Smarty throws an exception (fixes #130) --- index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 191aed9..13a7686 100644 --- a/index.php +++ b/index.php @@ -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()); +}