[libpeas] Add warnings when a type or method is not found in introspection.
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Add warnings when a type or method is not found in introspection.
- Date: Fri, 25 Jun 2010 11:51:42 +0000 (UTC)
commit 376d5aa5c745c11394f27bd69879b31239379ef5
Author: Steve Frécinaux <code istique net>
Date: Wed Jun 23 22:42:57 2010 +0200
Add warnings when a type or method is not found in introspection.
This makes debugging easier than when non-existing methods just ended
up not doing anything.
libpeas/peas-introspection.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/libpeas/peas-introspection.c b/libpeas/peas-introspection.c
index 61e616e..a08011b 100644
--- a/libpeas/peas-introspection.c
+++ b/libpeas/peas-introspection.c
@@ -132,7 +132,11 @@ peas_method_get_info (GType iface_type,
repo = g_irepository_get_default ();
iface_info = g_irepository_find_by_gtype (repo, iface_type);
if (iface_info == NULL)
- return NULL;
+ {
+ g_warning ("Type not found in introspection: %s",
+ g_type_name (iface_type));
+ return NULL;
+ }
switch (g_base_info_get_type (iface_info))
{
@@ -148,6 +152,13 @@ peas_method_get_info (GType iface_type,
func_info = NULL;
}
+ if (func_info == NULL)
+ {
+ g_warning ("Method %s.%s not found",
+ g_type_name (iface_type),
+ method_name);
+ }
+
g_base_info_unref (iface_info);
return (GICallableInfo *) func_info;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]