8000 fix FlattenException namespace · symfony/symfony-docs@d99914a · GitHub
[go: up one dir, main page]

Skip to content

Commit d99914a

Browse files
alchimikweaverryan
authored andcommitted
fix FlattenException namespace
1 parent bfb864a commit d99914a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

create_framework/http_kernel_httpkernel_class.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ Our code is now much more concise and surprisingly more robust and more
6565
powerful than ever. For instance, use the built-in ``ExceptionListener`` to
6666
make your error management configurable::
6767

68-
$errorHandler = function (HttpKernel\Exception\FlattenException $exception) {
68+
use Symfony\Component\Debug\Exception\FlattenException;
69+
70+
$errorHandler = function (FlattenException $exception) {
6971
$msg = 'Something went wrong! ('.$exception->getMessage().')';
7072

7173
return new Response($msg, $exception->getStatusCode());
@@ -88,7 +90,7 @@ The error controller reads as follows::
8890
namespace Calendar\Controller;
8991

9092
use Symfony\Component\HttpFoundation\Response;
91-
use Symfony\Component\HttpKernel\Exception\FlattenException;
93+
use Symfony\Component\Debug\Exception\FlattenException;
9294

9395
class ErrorController
9496
{

0 commit comments

Comments
 (0)
0