mirror of
https://github.com/filp/whoops.git
synced 2026-09-13 11:16:26 +00:00
utilize newly publicized isLevelFatal utility method instead of repeating that logic
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user