diff options
author | Colin Walters <walters@verbum.org> | 2010-07-31 06:22:52 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-08-17 13:12:52 -0400 |
commit | 616a918019f730184bc7aee0f4570a67db8850b9 (patch) | |
tree | 4fa156698bc51a49504fd457bad3615e6d321b31 /girepository/girepository.c | |
parent | c79b5be318cc2a9e15976c395e3ad910ef623d40 (diff) | |
download | gobject-introspection-616a918019f730184bc7aee0f4570a67db8850b9.tar.gz |
[girepository] Fix up error printing
We didn't show the right error message if we failed to find
the symbol; fix this by removing error printing from the
middle of the dumper, and add it correctly to the toplevel
dump entry point.
Diffstat (limited to 'girepository/girepository.c')
-rw-r--r-- | girepository/girepository.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/girepository/girepository.c b/girepository/girepository.c index 50bcfbdc..17d076d5 100644 --- a/girepository/girepository.c +++ b/girepository/girepository.c @@ -1378,8 +1378,15 @@ g_irepository_introspect_cb (const char *option_name, gpointer data, GError **error) { - gboolean ret = g_irepository_dump (value, error); - exit (ret ? 0 : 1); + GError *tmp_error = NULL; + gboolean ret = g_irepository_dump (value, &tmp_error); + if (!ret) + { + g_error ("Failed to extract GType data: %s", + tmp_error->message); + exit (1); + } + exit (0); } static const GOptionEntry introspection_args[] = { |