diff --git a/create_framework/http_kernel_httpkernel_class.rst b/create_framework/http_kernel_httpkernel_class.rst index 890369979d1..00a6c3a2e18 100644 --- a/create_framework/http_kernel_httpkernel_class.rst +++ b/create_framework/http_kernel_httpkernel_class.rst @@ -69,7 +69,9 @@ Our code is now much more concise and surprisingly more robust and more powerful than ever. For instance, use the built-in ``ExceptionListener`` to make your error management configurable:: - $errorHandler = function (HttpKernel\Exception\FlattenException $exception) { + use Symfony\Component\Debug\Exception\FlattenException; + + $errorHandler = function (FlattenException $exception) { $msg = 'Something went wrong! ('.$exception->getMessage().')'; return new Response($msg, $exception->getStatusCode()); @@ -92,7 +94,7 @@ The error controller reads as follows:: namespace Calendar\Controller; use Symfony\Component\HttpFoundation\Response; - use Symfony\Component\HttpKernel\Exception\FlattenException; + use Symfony\Component\Debug\Exception\FlattenException; class ErrorController {