-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Improve cookbook entry for error pages in 2.3~ #4294
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
Conversation
the status code that should be set for the given exception. | ||
The ``HttpKernel`` class will catch any exception thrown out of a | ||
Symfony application and dispatch a ``kernel.exception`` event for it | ||
. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there a linebreak here?
I like it a lot, thanks @mpdude ! |
Sorry, but I don't get the capitalization rules :) Not a native speaker, though. |
@mpdude we use title caps, which means that every word is capitialized except from closed-class words. Closed-class words are words that can't be "extended" by other words. E.g. "title" is not a closed-class word, you can extend it by saying "a strong title", "a complicated title", etc. "the" on the other hand can't be extended and is a closed-class word. |
By default, the core TwigBundle will set up an event listener for that | ||
event. It will run a configurable but otherwise arbitrary controller | ||
to generate the response. The exception will be passed to the | ||
controller as parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"[...] as a parameter."
@mpdude For now, I think it's fine if you just remove the backticks in the headlines completely. We can discuss this topic later on. But that's out of the scope of this pull request. Sorry for the confusion. |
Roger that. Let me know when I should squash this PR. How/when will you decide if this gets merged? |
From my point of view, this is perfect to be merged now. Let's see what the others think. If you want to, you can of course squash your commits. |
#. Use the ``kernel.exception`` event to come up with your own | ||
handling (advanced). | ||
|
||
Using the Default ExceptionController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Customize Error Templates
I like including the numbers when you have a mini-table of contents like we do here. In fact, I really like how you organized things. We could even link the above lines down to each section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you show me an example for such in-page links please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! If the header were Customize Error Templates
, then you would have:
See `Customize Error Templates`_
@mpdude Comments added - BIG improvement! |
Squashed & ready for merge (as far as I am concerned). Thanks to everyone involved for the feedback! |
Using the Default ExceptionController | ||
------------------------------------- | ||
|
||
By default, the ``showAction()`` method of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] of the [...]
@mpdude Thank you! I'm sorry, but I just found another minor issue. |
Done |
This is really nice @mpdude! Thank you for your patience with all our comments and suggestions. |
Really fantastic job Matthias! You are one of my favorite contributors :) |
This PR was merged into the 2.3 branch. Discussion ---------- Improve cookbook entry for error pages in 2.3~ This PR cherry-picks the improvements from #4293 that apply to 2.3 as well (almost all!). It also addresses some of the considerations in #4181. Commits ------- f74b6f2 Improve cookbook entry for error pages in 2.3~
Hooray! Contributing to the docs is the best way to teach my fellows -- they will check here first instead of reading the corporate wiki :-) |
This PR cherry-picks the improvements from #4293 that apply to 2.3 as well (almost all!).
It also addresses some of the considerations in #4181.