Gracefully catches Twig exceptions and displays error messages

MAILPOET-667 #time 3h
This commit is contained in:
Tautvidas Sipavičius
2016-11-10 16:33:50 +02:00
parent ee119215c0
commit b046c9ea4b
7 changed files with 117 additions and 38 deletions

View File

@ -73,7 +73,11 @@ class Widget {
)
);
echo $this->renderer->render('form/iframe.html', $data);
try {
echo $this->renderer->render('form/iframe.html', $data);
} catch(\Exception $e) {
echo $e->getMessage();
}
}
exit();
}