Remove legacy exception catches from 2.x

This commit is contained in:
Robin Chalas
2017-01-23 22:13:37 +01:00
parent dbbb7401a3
commit 352c01a078
4 changed files with 0 additions and 19 deletions
-6
View File
@@ -1269,12 +1269,6 @@ function twig_include(Twig_Environment $env, $context, $template, $variables = a
$sandbox->disableSandbox();
}
throw $e;
} catch (Exception $e) {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
throw $e;
}
-6
View File
@@ -370,12 +370,6 @@ abstract class Twig_Template
ob_start();
try {
$this->display($context);
} catch (Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
-6
View File
@@ -93,12 +93,6 @@ final class Twig_TemplateWrapper
ob_start();
try {
$this->template->displayBlock($name, $context);
} catch (Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
@@ -250,7 +250,6 @@ EOF
try {
$twig->loadTemplate('1_include')->render(self::$params);
} catch (Throwable $e) {
} catch (Exception $e) {
}
if ($e === null) {
$this->fail('An exception should be thrown for this test to be valid.');