[pygobject] Make error message less ambiguous



commit 890c3233f8a9f884b045a294bf0122bb3afcd54a
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date:   Sun Jul 25 17:30:40 2010 +0100

    Make error message less ambiguous
    
    https://bugzilla.gnome.org/show_bug.cgi?id=625095

 gi/pygi-callbacks.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygi-callbacks.c b/gi/pygi-callbacks.c
index 6fdc1ce..d7537ee 100644
--- a/gi/pygi-callbacks.c
+++ b/gi/pygi-callbacks.c
@@ -200,7 +200,8 @@ _pygi_create_callback (GIBaseInfo  *function_info,
 
     if (!found_py_function
             || (py_function == Py_None || !PyCallable_Check (py_function))) {
-        PyErr_Format (PyExc_TypeError, "Error invoking %s.%s: Invalid callback given for argument %s",
+        PyErr_Format (PyExc_TypeError, "Error invoking %s.%s: Unexpected value "
+                      "for argument '%s'",
                       g_base_info_get_namespace ( (GIBaseInfo*) function_info),
                       g_base_info_get_name ( (GIBaseInfo*) function_info),
                       g_base_info_get_name ( (GIBaseInfo*) callback_arg));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]