Skip to content

Commit d80e47f

Browse files
authored
Restore other changes
1 parent c61511d commit d80e47f

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/Server/Manager.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use Symfony\Component\Console\Output\ConsoleOutput;
2424
use SwooleTW\Http\Concerns\InteractsWithSwooleQueue;
2525
use SwooleTW\Http\Concerns\InteractsWithSwooleTable;
26-
use Symfony\Component\ErrorHandler\Error\FatalError;
26+
use Symfony\Component\Debug\Exception\FatalThrowableError;
2727

2828
/**
2929
* Class Manager
@@ -411,23 +411,7 @@ public function logServerError(Throwable $e)
411411
protected function normalizeException(Throwable $e)
412412
{
413413
if (! $e instanceof Exception) {
414-
if ($e instanceof \ParseError) {
415-
$severity = E_PARSE;
416-
} elseif ($e instanceof \TypeError) {
417-
$severity = E_RECOVERABLE_ERROR;
418-
} else {
419-
$severity = E_ERROR;
420-
}
421-
422-
//error_get_last() syntax
423-
$error = [
424-
'type' => $severity,
425-
'message' => $e->getMessage(),
426-
'file' => $e->getFile(),
427-
'line' => $e->getLine(),
428-
];
429-
430-
$e = new FatalError($e->getMessage(), $e->getCode(), $error, null, true, $e->getTrace());
414+
$e = new FatalThrowableError($e);
431415
}
432416

433417
return $e;

0 commit comments

Comments
 (0)