diff Python/ceval.c @ 59422:e6d14158758e 2.6

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 ........
author Benjamin Peterson <benjamin@python.org>
date Sun, 07 Mar 2010 00:07:45 +0000
parents 222b6d80e769
children e38335d4df91
line wrap: on
line diff
--- a/Python/ceval.c	Sat Mar 06 02:26:07 2010 +0000
+++ b/Python/ceval.c	Sun Mar 07 00:07:45 2010 +0000
@@ -3260,8 +3260,9 @@
 		/* 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;
 	}