Skip to content
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

API: Added 'onBeforeHTTPError' and 'onBeforeHTTPError<code>' extension p... #827

Merged
merged 1 commit into from
Sep 27, 2012
Merged

API: Added 'onBeforeHTTPError' and 'onBeforeHTTPError<code>' extension p... #827

merged 1 commit into from
Sep 27, 2012

Conversation

sminnee
Copy link
Member

@sminnee sminnee commented Sep 27, 2012

...oints to RequestHandler::httpError().

These APIs are primarily intended to let developers write custom 404 handlers. They can define an onBeforeHTTPError404() method on an Extension that gets added to Controller or RequestHandler.

The SS_HTTPResponse_Exception object has also been tidied up to override the status info of any SS_HTTPResponse object that might get passed. This is mainly to make it easier for callers (such as ContentController and ModelAsController) to use RequestHandler::httpError() more consistently.

…n points to RequestHandler::httpError().

These APIs are primarily intended to let developers write custom 404 handlers.  They can define an onBeforeHTTPError404() method on an Extension that gets added to Controller or RequestHandler.

The SS_HTTPResponse_Exception object has also been tidied up to override the status info of any SS_HTTPResponse object that might get passed.  This is mainly to make it easier for callers (such as ContentController and ModelAsController) to use RequestHandler::httpError() more consistently.
simonwelsh added a commit that referenced this pull request Sep 27, 2012
API: Added 'onBeforeHTTPError' and 'onBeforeHTTPError<code>' extension p...
@simonwelsh simonwelsh merged commit 7bd36eb into silverstripe:master Sep 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants