Redesign of symfony exceptions

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.

Comments

It is neat, and it is great!
Please keep the traced file path completely.
wow, sounds great!
Great, new exception really functional for debugging

The fact that public users were seeing those exception was annoying too, glad it's changed.

good work go on :p
awesome, symfony just gets better and better.

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.