Message10300

Author zyasoft
Recipients zyasoft
Date 2015-09-29.03:46:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443498395.68.0.921796760997.issue2407@psf.upfronthosting.co.za>
In-reply-to
Content
Not implementing an abstract method from an abstract class or interface in Java currently raises a NotImplementedError exception. However, it does not specify the offending type, method, or object, which makes debugging extremely difficult.

At the very least, we should provide the same level of detail as AttributeError on objects.

>>> from javax.servlet.http import HttpServletResponse
>>> class MockResponse(HttpServletResponse): pass
...

Compare

>>> x = MockResponse()
>>> x.getOutputStream()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NotImplementedError

vs

>>> x.getBaz()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'MockResponse' object has no attribute 'getBaz'
History
Date User Action Args
2015-09-29 03:46:35zyasoftsetrecipients: + zyasoft
2015-09-29 03:46:35zyasoftsetmessageid: <1443498395.68.0.921796760997.issue2407@psf.upfronthosting.co.za>
2015-09-29 03:46:35zyasoftlinkissue2407 messages
2015-09-29 03:46:34zyasoftcreate