[Python-checkins] CVS: python/dist/src/Python ceval.c,2.238.2.3,2.238.2.4
Anthony Baxter
anthonybaxter@users.sourceforge.net
Tue, 20 Nov 2001 20:49:21 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv9431
Modified Files:
Tag: release21-maint
ceval.c
Log Message:
backport of 2.242:
improved error message-- names the type of the unexpected object
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.238.2.3
retrieving revision 2.238.2.4
diff -C2 -d -r2.238.2.3 -r2.238.2.4
*** ceval.c 2001/10/21 05:57:28 2.238.2.3
--- ceval.c 2001/11/21 04:49:19 2.238.2.4
***************
*** 2471,2476 ****
/* Not something you can raise. You get an exception
anyway, just not what you specified :-) */
! PyErr_SetString(PyExc_TypeError,
! "exceptions must be strings, classes, or instances");
goto raise_error;
}
--- 2471,2477 ----
/* Not something you can raise. You get an exception
anyway, just not what you specified :-) */
! PyErr_Format(PyExc_TypeError,
! "exceptions must be strings, classes, or "
! "instances, not %s", type->ob_type->tp_name);
goto raise_error;
}