[Python-checkins] CVS: python/dist/src/Python ceval.c,2.241,2.242
Jeremy Hylton
jhylton@users.sourceforge.net
Thu, 26 Apr 2001 19:25:35 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv14007
Modified Files:
ceval.c
Log Message:
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.241
retrieving revision 2.242
diff -C2 -r2.241 -r2.242
*** ceval.c 2001/04/23 14:08:49 2.241
--- ceval.c 2001/04/27 02:25:33 2.242
***************
*** 2494,2499 ****
/* 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;
}
--- 2494,2500 ----
/* 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;
}