NotImplementedErrors should provide exception messages
|Reported by:||Owned by:||Tim Clifford|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The Django source has many occurrences of NotImplementedErrors raised without a message. For example, if a dev creates a class inheriting from contrib.admin.SimpleListFilter and does not provide a lookups() method, all they see from the Debug template is "NotImplementedError at /path/to/file/ No exception supplied". This, in my opinion, makes seeking help difficult for those not comfortable enough to dig through the Django source. A simple message such as "instances of SimpleListFilter must provide a lookups() method" provides instant feedback and a non-ambiguous means to seeking help if needed.
In short, my request is to have all NotImplementedError exceptions raised accompanied by a message.
I realize this change would be boring to work on, so I am more than willing to read through the patch procedures and submit a patch myself if you all find this a worthy cause. (The nature of this request may even be simple enough to send through Github)
Change History (5)
comment:1 Changed 3 years ago by
|Component:||Uncategorized → Core (Other)|
|Triage Stage:||Unreviewed → Accepted|
|Version:||1.5 → master|