8000 bug #6797 fix FlattenException namespace (alchimik) · symfony/symfony-docs@f71b7bd · GitHub
[go: up one dir, main page]

Skip to content

Commit f71b7bd

Browse files
committed
bug #6797 fix FlattenException namespace (alchimik)
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #6797). Discussion ---------- fix FlattenException namespace Commits ------- d99914a fix FlattenException namespace
2 parents bfb864a + d99914a commit f71b7bd

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