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

@ -146,8 +146,9 @@ class Initializer {
}
function setupRenderer() {
$renderer = new Renderer();
$this->renderer = $renderer->init();
$caching = !WP_DEBUG;
$debugging = WP_DEBUG;
$this->renderer = new Renderer($caching, $debugging);
}
function setupLocalizer() {
@ -210,4 +211,4 @@ class Initializer {
function handleFailedInitialization($message) {
return WPNotice::displayError($message);
}
}
}