diff options
| author | Johan Dahlin <johan@src.gnome.org> | 2005-09-22 23:14:01 +0000 |
|---|---|---|
| committer | Johan Dahlin <johan@src.gnome.org> | 2005-09-22 23:14:01 +0000 |
| commit | 8acb55740ab353ac461bcccd8094c592391a02ee (patch) | |
| tree | 5e13569f1de2da34593eab21a8138648f62b2959 /gobject/gobjectmodule.c | |
| parent | aa9ad01a98ff1a9e6211e5311606f1d4d124eba5 (diff) | |
| download | pygobject-8acb55740ab353ac461bcccd8094c592391a02ee.tar.gz pygobject-8acb55740ab353ac461bcccd8094c592391a02ee.tar.xz pygobject-8acb55740ab353ac461bcccd8094c592391a02ee.zip | |
Include the object and the name of the signal in TypeErrors
* gobject/gobjectmodule.c: (pyg_type_from_name):
* gobject/pygobject.c: (pygobject_connect),
(pygobject_connect_after), (pygobject_connect_object),
(pygobject_connect_object_after), (pygobject_emit),
(pygobject_stop_emission):
Include the object and the name of the signal in TypeErrors
Diffstat (limited to 'gobject/gobjectmodule.c')
| -rw-r--r-- | gobject/gobjectmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 0bcc98e..f07be35 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -274,7 +274,9 @@ pyg_type_from_name (PyObject *self, PyObject *args) type = g_type_from_name(name); if (type != 0) return pyg_type_wrapper_new(type); - PyErr_SetString(PyExc_RuntimeError, "unknown type name"); + PyErr_Format(PyExc_RuntimeError, "%s: unknown type name: %s", + PyString_AsString(PyObject_Repr((PyObject*)self)), + name); return NULL; } |
