From c4e19d1f7555cc6e7a5ca95ffac4e3a2abe42b16 Mon Sep 17 00:00:00 2001 From: Adam Vercimak Date: Tue, 11 Aug 2015 23:02:44 -0500 Subject: [PATCH] utilize newly publicized isLevelFatal utility method instead of repeating that logic --- src/Whoops/Exception/Inspector.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/Whoops/Exception/Inspector.php b/src/Whoops/Exception/Inspector.php index 8ea70db..0194d8a 100644 --- a/src/Whoops/Exception/Inspector.php +++ b/src/Whoops/Exception/Inspector.php @@ -7,6 +7,7 @@ namespace Whoops\Exception; use Exception; +use Whoops\Util\Misc; class Inspector { @@ -142,22 +143,7 @@ class Inspector return $traces; } - switch ($e->getSeverity()) { - case E_ERROR: - case E_RECOVERABLE_ERROR: - case E_PARSE: - case E_CORE_ERROR: - case E_COMPILE_ERROR: - case E_USER_ERROR: - $fatal = true; - break; - - default: - $fatal = false; - break; - } - - if (!$fatal) { + if (!Misc::isLevelFatal($e->getCode())) { return $traces; }