#23002: handle_uncaught_exception: add support for debug=True kwarg / factor
request.error logging out
-------------------------------------+-------------------------------------
     Reporter:  blueyed              |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  Core (Other)         |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timo):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 So in the djangosnippets middleware you want to replace `return
 technical_500_response(request, *exc_info)` with something like `return
 BaseHandler().handle_uncaught_exception(request, resolver, exc_info,
 debug=True)`? That still wouldn't achieve the same thing as your last
 snippet as `SafeExceptionReporterFilter` checks `settings.DEBUG`. I think
 you should instead use a custom
 `settings.DEFAULT_EXCEPTION_REPORTER_FILTER` and subclass
 `django.views.debug.SafeExceptionReporterFilter` overriding the `is_safe`
 method with the same condition as in your middleware.

 Summary: I think there are enough hooks now to accomplish what you want.
 If you want to write a patch, I will look at it though.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23002#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.21c628619426f8e13c76ad7ea4dd4e17%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to