Add tool to capture exceptions

This is similar to Django's Http404 exception, but with any status code.  I'm looking for feedback on this, so let me know if you see any issues or potential use cases that could be incorporated.