Hi Pavel, thanks for your input.
You're absolutely correct re the handler500
suggestion. That's not sufficient at all. (I'm not sure quite what was in my head thinking about this.)
I've adjusted the description appropriately.
Looking at it, there's no nice way to pass down the exception reporter class so, I agree, a setting will be the easiest way forward.
Your PR looks more or less right, but I think we need to say more in the Custom error reports
section of the docs. Specifically we should probably begin stating that the reports are created by the ExceptionReporter
class, and that it uses an ExceptionReporterFilter
to control the filtering. Then then existing filtering examples are OK — that's the first port of call ‚ before giving an override example for ExceptionReporter
...
class CustomExceptionReporter(ExceptionReporter):
def get_traceback_data(self):
data = super().get_traceback_data()
# ... remove/add something here...
return data
That should be about it. (I'm not sure there's any demand to customise anything else on ExceptionReporter
.)
Thanks again, super stuff.