I am working on Symfony and have created a custom error page following the instructions in the Symfony documentation.
So, I have the file app / Ressources / TwigBundle / views / Exception / error.html.twig. It works fine, but in my error view, I want to display the Exception text, so if I do this in the controller:
throw new \Exception('Ooops !');
... I can display the value "Ooops!" in my twig view.
Does anyone know which Twig variable has this information?
source share