marrow / WebCore

WebCore, the super tiny and blazingly fast modular Python web nanoframework.
MIT License
96 stars 9 forks source link

Allow custom handlers for HTTP errors (especially 404 and 500) #44

Closed agronholm closed 8 years ago

agronholm commented 13 years ago

If this can be done with current WebCore, I don't know how. Implement and document this.

amcgregor commented 13 years ago

This is actually demonstrated in the Paste Deploy Example, but needs to be explicitly documented.

amcgregor commented 13 years ago

See also #19 which has a simplified demonstration of how to do this.

agronholm commented 12 years ago

Using Paste's errorDocument for this, I noticed two problems:

  1. I no longer get emails notifications for exceptions
  2. web.url() produces incorrect application-relative URLs
amcgregor commented 8 years ago

Now easily possible by registering a view handler for the appropriate HTTPException subclass, amongst other methods (such as front-end web server configuration).