diff options
author | Fred Drake <fdrake@acm.org> | 2000-06-01 03:12:13 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-06-01 03:12:13 (GMT) |
commit | b6a9ada757a99023e286addc6f2947747a8105ec (patch) | |
tree | d79372c01437217f7a14663ddf379f487dd73cf8 /Objects/stringobject.c | |
parent | 94c3452ade3dbc2c09e772b0507084551fe49b4c (diff) | |
download | cpython-b6a9ada757a99023e286addc6f2947747a8105ec.zip cpython-b6a9ada757a99023e286addc6f2947747a8105ec.tar.gz cpython-b6a9ada757a99023e286addc6f2947747a8105ec.tar.bz2 |
Michael Hudson <mwh21@cam.ac.uk>:
Removed PyErr_BadArgument() calls and replaced them with more useful
error messages.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index f17fbf1..ce6548b 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -293,7 +293,9 @@ string_concat(a, bb) if (!PyString_Check(bb)) { if (PyUnicode_Check(bb)) return PyUnicode_Concat((PyObject *)a, bb); - PyErr_BadArgument(); + PyErr_Format(PyExc_TypeError, + "cannot add type \"%.200s\" to string", + bb->ob_type->tp_name); return NULL; } #define b ((PyStringObject *)bb) |