summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-03-07 00:07:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-03-07 00:07:45 (GMT)
commit264a01091a5808792653239648fc5e15c90a823c (patch)
tree4e1ebae7e8664d0f0db94edbd88eda612edd6084 /Python
parentb1e22e3def4b4c146c7daa850784061ff2b17d43 (diff)
downloadcpython-264a01091a5808792653239648fc5e15c90a823c.zip
cpython-264a01091a5808792653239648fc5e15c90a823c.tar.gz
cpython-264a01091a5808792653239648fc5e15c90a823c.tar.bz2
Merged revisions 78746 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78746 | benjamin.peterson | 2010-03-06 18:00:37 -0600 (Sat, 06 Mar 2010) | 1 line more specific exception for wrong kind of raise #8082 ........
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index f72fe4a..6dd370f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3260,8 +3260,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;
}