]> granicus.if.org Git - python/commitdiff
Merged revisions 78746 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Sun, 7 Mar 2010 00:07:45 +0000 (00:07 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 7 Mar 2010 00:07:45 +0000 (00:07 +0000)
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
........

Python/ceval.c

index f72fe4ae02fdcffc080832da062e395da2290c5c..6dd370f5f7e21e8d836483d3a46efe7d8ffb2b08 100644 (file)
@@ -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;
        }