Blog

Redesign of symfony exceptions

« Back to the Blog

Categories

Feeds

feed Posts feed

comments feed Comments feed

Be trained by symfony experts
Dec 10: Paris (1.1 - Francais)
Dec 10: Atlanta (1.1 - English)
Dec 17: Montreal (1.1 - Francais)
Jan 21: Paris (1.1 - Francais)
Feb 18: Paris (1.1 - Francais)
and more...

Archives

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

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 comments feed

gravatar
#1 tamcy said about 3 hours later

It is neat, and it is great!

gravatar
#2 epaulin said about 10 hours later

Please keep the traced file path completely.

gravatar
#3 bladus said about 22 hours later

wow, sounds great!

gravatar
#4 Hartym said 1 day later

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

gravatar
#5 jason rowe said 1 day later

awesome, symfony just gets better and better.