#29664: Need Proper error handling for CBV in urls. -------------------------------------+------------------------------------- Reporter: Amar | Owner: emiamar@… Type: | Status: assigned Cleanup/optimization | Component: Core (URLs) | Version: 2.1 Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Ramiro Morales): I'm afraid catching `TypeError` around the view callable execution is a too coarse net to have. what if the view (be it either a traditional function-based view, or a correctly invoked class based view via it's `.as_view()` method, etc.) result in a legitimate `TypeError`? Wouldn't the useful traceback that cold help the developer diagnose the issue be replaced by the new one that reports `"Check if as_view() method called properly"`? In the end there a needs to be placed between handholding a developer which face this kind of problems, and the expectation of them reading the relevan documentation, i.e. https://docs.djangoproject.com/en/dev/topics/class-based-views/#simple- usage-in-your-urlconf https://docs.djangoproject.com/en/dev/topics/class-based-views/intro /#using-class-based-views I'm ok with trying to be more helpful but not at the expense of reducing the usefulness of normal Python debugging techniques. -- Ticket URL: <https://code.djangoproject.com/ticket/29664#comment:2> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.1438a1b64a6105ebbd48ea8dcf185f63%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.