In Symfony 2 you can do the following to return a 404 page
throw $this->createNotFoundException('message');
I was assuming that status_text in the error template would display the custom message, but that does not seem to be the case. How can you display the custom message?
Short question, but I dont think this needs more information? Feel free to ask!
Looking at the show action of ExceptionController you can access the exception inside twig:
{{ exception.message }}
status_text and status_code are related to the HTTP protocol. To customize the error page look at the official documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With