Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cfbd190

Browse files
committed
moved exception handler to AppKernel to be more consistent with the error handler
1 parent ad88e75 commit cfbd190

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

app/AppKernel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use Symfony\Component\Config\Loader\LoaderInterface;
55
use Symfony\Component\ClassLoader\DebugUniversalClassLoader;
66
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
7+
use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
78

89
class AppKernel extends Kernel
910
{
@@ -38,6 +39,7 @@ public function init()
3839

3940
DebugUniversalClassLoader::enable();
4041
ErrorHandler::register();
42+
ExceptionHandler::register();
4143
} else {
4244
ini_set('display_errors', 0);
4345
}

app/logs/.gitkeep

100644100755
File mode changed.

web/app_dev.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
require_once __DIR__.'/../app/AppKernel.php';
1515

1616
use Symfony\Component\HttpFoundation\Request;
17-
use Symfony\Component\HttpKernel\Debug\DebugExceptionHandler;
18-
19-
set_exception_handler(new DebugExceptionHandler());
2017

2118
$kernel = new AppKernel('dev', true);
2219
$kernel->loadClassCache();

0 commit comments

Comments
 (0)