diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-03-07 00:00:37 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-03-07 00:00:37 +0000 |
commit | 9c4742e6ce2e1107ad07bc40695069e4c83a82c4 (patch) | |
tree | aad1f479fa5e8e97c81a63d5c61275603a95d479 /Python/ceval.c | |
parent | 5da7e7ce3fdd23959522f1f5f98e3dfe49aac94c (diff) | |
download | cpython-git-9c4742e6ce2e1107ad07bc40695069e4c83a82c4.tar.gz |
more specific exception for wrong kind of raise #8082
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 7c1f7816e8..1aa87a8d94 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3539,8 +3539,9 @@ do_raise(PyObject *type, PyObject *value, PyObject *tb) /* Not something you can raise. You get an exception anyway, just not what you specified :-) */ PyErr_Format(PyExc_TypeError, - "exceptions must be classes or instances, not %s", - type->ob_type->tp_name); + "exceptions must be old-style classes or " + "derived from BaseException, not %s", + type->ob_type->tp_name); goto raise_error; } |