[seed] Nicer warning messages on our temporary warning about not_null check
- From: Alan Knowles <alank src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] Nicer warning messages on our temporary warning about not_null check
- Date: Fri, 12 Mar 2010 04:33:21 +0000 (UTC)
commit 0d89528065d18af2c17c29b79649819015bad3ab
Author: Alan Knowles <alan akbkhome com>
Date: Fri Mar 12 12:31:57 2010 +0800
Nicer warning messages on our temporary warning about not_null check
As we do not throw Exceptions currently, it is difficult to work out what caused a warning,
This just adds the Container/Namespace of the method that caused the problem
libseed/seed-engine.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libseed/seed-engine.c b/libseed/seed-engine.c
index bc89f8a..8092fed 100644
--- a/libseed/seed-engine.c
+++ b/libseed/seed-engine.c
@@ -537,13 +537,18 @@ seed_gobject_method_invoked (JSContextRef ctx,
if (is_null)
{
+ GIBaseInfo *ctr = g_base_info_get_container((GIBaseInfo *) info);
+ // note - ctr does not need unref'ing (see ginfo.c source for why)
+
// RE-INSTATE THIS CODE LATER.. - when gtk etc. has be release with fixes
//seed_make_exception (ctx, exception,
// "ArgumentError",
g_warning( "ArgumentError - probably due to incorrect gir file (which may be fixed upstream)"
" argument %d must not be null for"
- " function: %s. \n",
+ " function: %s%s%s \n",
i + 1,
+ ctr ? g_base_info_get_name ((GIBaseInfo *) ctr) : "",
+ ctr ? "." : "",
g_base_info_get_name ((GIBaseInfo *)
info));
//goto arg_error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]