Skip to content

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

Merged
merged 1 commit into from
Oct 17, 2014
Merged

Improve cookbook entry for error pages in 2.3~ #4294

merged 1 commit into from
Oct 17, 2014

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Oct 4, 2014

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.

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
Copy link
Member

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?

@wouterj
Copy link
Member

wouterj commented Oct 5, 2014

I like it a lot, thanks @mpdude !

@mpdude
Copy link
Contributor Author

mpdude commented Oct 5, 2014

Sorry, but I don't get the capitalization rules :) Not a native speaker, though.

@wouterj
Copy link
Member

wouterj commented Oct 5, 2014

@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.

@mpdude
Copy link
Contributor Author

mpdude commented Oct 5, 2014

Extended the section on custom exception listeners that was discussed in #4181 and would like to get @stof's opinion on this.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"[...] as a parameter."

@xabbuh
Copy link
Member

xabbuh commented Oct 9, 2014

@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.

@mpdude
Copy link
Contributor Author

mpdude commented Oct 9, 2014

Roger that. Let me know when I should squash this PR.

How/when will you decide if this gets merged?

@xabbuh
Copy link
Member

xabbuh commented Oct 10, 2014

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 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.

Copy link
Contributor Author

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?

Copy link
Member

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`_

@weaverryan
Copy link
Member

@mpdude Comments added - BIG improvement!

@mpdude mpdude changed the title Improve cookbook entry for error pages in 2.3+ [WIP] Improve cookbook entry for error pages in 2.3+ Oct 15, 2014
@mpdude
Copy link
Contributor Author

mpdude commented Oct 15, 2014

Squashed & ready for merge (as far as I am concerned).

Thanks to everyone involved for the feedback!

@mpdude mpdude changed the title [WIP] Improve cookbook entry for error pages in 2.3+ Improve cookbook entry for error pages in 2.3+ Oct 15, 2014
Using the Default ExceptionController
-------------------------------------

By default, the ``showAction()`` method of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] of the [...]

@xabbuh
Copy link
Member

xabbuh commented Oct 16, 2014

@mpdude Thank you! I'm sorry, but I just found another minor issue.

@mpdude
Copy link
Contributor Author

mpdude commented Oct 16, 2014

Done

@mpdude mpdude changed the title Improve cookbook entry for error pages in 2.3+ Improve cookbook entry for error pages in 2.3~ Oct 16, 2014
@xabbuh
Copy link
Member

xabbuh commented Oct 17, 2014

This is really nice @mpdude! Thank you for your patience with all our comments and suggestions.

@weaverryan
Copy link
Member

Really fantastic job Matthias! You are one of my favorite contributors :)

@weaverryan weaverryan merged commit f74b6f2 into symfony:2.3 Oct 17, 2014
weaverryan added a commit that referenced this pull request Oct 17, 2014
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~
@mpdude
Copy link
Contributor Author

mpdude commented Oct 17, 2014

Hooray!

Contributing to the docs is the best way to teach my fellows -- they will check here first instead of reading the corporate wiki :-)

@mpdude mpdude deleted the update-error-pages-in-23 branch October 17, 2014 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants