silverstripe/sapphire — pull request #827 by sminnee (2012-09-27 00:27:50+00:00)
Title: API: Added 'onBeforeHTTPError' and 'onBeforeHTTPError<code>' extension p...

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