This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dimitri Merejkowsky
Recipients Dimitri Merejkowsky
Date 2016-10-29.18:16:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477764991.61.0.67228056749.issue28559@psf.upfronthosting.co.za>
In-reply-to
Content
Motivation for the patch came from a tweet[1] of David Beazley:

def SomeError(Exception): 
    pass 

raise SomeError('blah')

(Note the `def` keyword instead of `class`):

If you run that, you get:

> TypeError: exceptions must derive from BaseException

Which is not very helpful.

Attached patch changes the error message to be:

> TypeError: exceptions must derive from BaseException, got NoneType

(By the way, it's very close to what Python2 used to say in this case)
History
Date User Action Args
2016-10-29 18:16:31Dimitri Merejkowskysetrecipients: + Dimitri Merejkowsky
2016-10-29 18:16:31Dimitri Merejkowskysetmessageid: <1477764991.61.0.67228056749.issue28559@psf.upfronthosting.co.za>
2016-10-29 18:16:31Dimitri Merejkowskylinkissue28559 messages
2016-10-29 18:16:31Dimitri Merejkowskycreate