Redesign of symfony exceptions
March 27, 2006 • Published by Francois Zaninotto
The latest beta changes the look and content of the exceptions thrown by symony.
Up to now, when an exception occurred, it was sometimes difficult to use it to actually find the problem. Here is what the exception used to look like.
Now, the stack trace shows the PHP code (with syntax highlighting) that lead to the exception, making it much easier to find a bug. The arguments that were passed to the methods are also shown. The overall design of the exception pages was completely rebuilt, to have a lighter page layout.
The stack trace is also displayed if an exception is raised by a library that is not part of symfony.
Finally, when you run a symfony app in a non-debug mode, the exceptions are not shown anymore. Instead, the framework returns an Internal Server Error (status code 500) that you can customize by creating a 'error500.html' file in your web/ folder. This is much safer for your code, and much better for your users.
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.
The fact that public users were seeing those exception was annoying too, glad it's changed.
good work go on :p