Skip to content
Permalink
Browse files

Simplify error conversion

  • Loading branch information
flack committed Jan 9, 2020
1 parent 49ad7e9 commit 9452d0ef2d24880bbcc3ad77a6db7ca8fb89f897
Showing with 1 addition and 4 deletions.
  1. +0 −1 composer.json
  2. +1 −3 lib/errors.php
@@ -39,7 +39,6 @@
"symfony/config": ">=4.4",
"symfony/console" : ">=2.6.0",
"symfony/css-selector": ">=4.4",
"symfony/debug": ">=4.4",
"symfony/dom-crawler": ">=4.4",
"symfony/event-dispatcher": ">=4.4",
"symfony/finder": ">=4.4",
@@ -7,7 +7,6 @@
*/

use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\Debug\Exception\FatalErrorException;
use Symfony\Component\HttpFoundation\Response;

/**
@@ -57,8 +56,7 @@ public function set_kernel(HttpKernel $kernel)
public function handle_exception($error)
{
if ($error instanceof Error) {
$exception = new FatalErrorException($error->getMessage(), $error->getCode(), 0, $error->getFile(), $error->getLine(), null, true, $error->getTrace());
$this->kernel->terminateWithException($exception);
$this->kernel->terminateWithException($error);
} else {
throw $error;
}

0 comments on commit 9452d0e

Please sign in to comment.
You can’t perform that action at this time.