New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show error stack traces in default_error_page #914
Conversation
👍 |
Hi @xsawyerx & @veryrusty. Please could I ask you pull these fixes before we rename Currently Dancer2 won't show any stack-trace _ever!_ These fixes are being used constantly on our dev system and have been very valuable and work well. Thanx, |
When I think about it further, it would seem that there are two different things: showing errors ( @veryrusty @mickeyn @yanick @vlyon thoughts? |
It is true, that you could add more options to control how much detail we see in errors, but is that really needed? The changes in this PR only affect the We could always add options to control the level of detail displayed in this handler later, if that is what is really desired. But it would be nice to improve at least this part of it now. There is one way to somewhat implement what @xsawyerx is mentioning, which would result in behaviour slightly closer to what it is right now, but I'm not sure if it's what we want...
to this:
Whattcha thunk? |
Should I break this into smaller PRs? |
a12e8b9
to
7ff4261
Compare
C'mon guys, @veryrusty @mickeyn @yanick @xsawyerx
|
@vlyon I promise to look through this sometime this week (i.e. before the end of July). |
@veryrusty Awesome thanks. I also have a small change to improve the looks of the Dumped data (remove padding on the left and add css I'll add it in a mo. |
5bf610e
to
0396832
Compare
😄 Its still July and I've had a look! @vlyon++ Well done and a huge thanks for tackling this. Comments added on lines/commits as I think are appropriate ( only small code nits ). Do you have the tuits to clean these comments up? |
@veryrusty Thanx. |
Previously this would crash if has_app was false. Now it simply displays "undefined" for missing sections.
0396832
to
a9de208
Compare
👍 I'll merge this in the next couple of days. |
Thanx @veryrusty++ Now I can start work on producing a more useful stack trace... 👍 |
[ BUG FIXES ] * GH #947, #948: Escape file paths in regex patterns. (A. Sinan Unur) * GH #944: Setting response content in before hook when a serializer is set no longer triggers an error. (Russell Jenkins, Dmitrii Tcyganov) * GH #965: Remove non-existant role from Response::Delayed. (Vernon, Russell Jenkins) * GH #971: Route options matching no longer uses each iterator. (Tina Müller) * GH #959: Custom error template rendering fixed. (Russell Jenkins) * GH #961: Render custom error templates in before hooks. (Russell Jenkins) * GH #978: Tests - fix response regex after html_encode (Vernon) * GH #972: Exceptions thrown by serializers no longer masked. (Russell Jenkins) [ DOCUMENTATION ] * GH #967: Fix upload example. (Alberto Simões) * GH #881: Add cookie timeout example. (Andy Beverley) * GH #963: Document all available template tokens. (Sawyer X) [ ENHANCEMENTS ] * Optimize the s*#t out of basic routing. Faster than Dancer 1 now. (Sawyer X) * Only load HTTP::Server::PSGI when asked to start a development server not under Plack. (Sawyer X, Mickey Nasriachi) * GH #949: Produce cleaner, non-verbose test output (Vernon) * GH #950: Decode characters in param keys (Patrick Zimmermann) * GH #914: Include stack trace on default error page when show_errors is true. (Vernon) * GH #980, #981: halt keyword sets response content if provided, as Dancer 1 does. (Achilles Kars) * GH #909, #957, #983: HTML5 templates in generated apps and default error template (Gabor Szabo, Kadir, Vernon) * GH #972, #719, #969, #644, #647: Streamline serializer helpers. to_json/from_json now faster. (Russell Jenkins)
Fix for the missing stack trace on the default error page.
When
show_errors
is true, thedefault_error_page
will now display a full stack trace (currently unused!) instead of the very useless basic message.This is obviously the intended behaviour. See #769
If
show_errors
is false, a static page is shown if available, but if it's not available then the currentdefault_error_page
will actually show the error, ignoring theshow_errors
setting.This is also fixed by this change.