[Python-checkins] r78746 - python/trunk/Python/ceval.c
benjamin.peterson
python-checkins at python.org
Sun Mar 7 01:00:37 CET 2010
Author: benjamin.peterson
Date: Sun Mar 7 01:00:37 2010
New Revision: 78746
Log:
more specific exception for wrong kind of raise #8082
Modified:
python/trunk/Python/ceval.c
Modified: python/trunk/Python/ceval.c
==============================================================================
--- python/trunk/Python/ceval.c (original)
+++ python/trunk/Python/ceval.c Sun Mar 7 01:00:37 2010
@@ -3539,8 +3539,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;
}
More information about the Python-checkins
mailing list