We need to introduce a system for registering custom error views.
By which you mean custom 404 and 503 pages, for example?
Basically the scenario should be that the application raises an exception, and you catch it, and display a view. This may be a HTTP exception object, so you can do a custom 404, but you could also catch custom exceptions that have meaning to your application.
Launchpad.net has some fairly involved error reporting mechanisms that might be cool to integrate or look at for inspiration:
Hm, those oops tools aree interesting but they're unrelated to error views I think. An error view helps you give the capability to show a different user-visible error response. The oops tools are tools you can integrate during deployment that can log errors for you. Care to make a new issue about these oops tools?
Sorry, this link should make it more obvious how this interacts with user-visible errors: https://pypi.python.org/pypi/oops_wsgi
The other packages:
Ah, oops has a way to customize the error page. But that's not what oops seems to be about; the primary goal seems to be the logging of errors.
Anyway, I was thinking about something like:
def zero_division(self, request):
return "The application unfortunately suffered from a division by zero!"
Ah, Now I see what you were getting at. Very nice!
I need to do some investigation in how I can retain the HTTP error of the exception already raised in the new response object the view returns (if it's something from werkzeug.exceptions)>
This is implemented now.