summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2015-08-03 22:22:43 -0400
committerColin Walters <walters@verbum.org>2015-08-04 10:11:00 -0400
commit6ac310a3379baa34f4614f03fbd573e2ec4549f4 (patch)
treeb82b39c2c870e914c9fecb8ddbf4753b5417321e
parenteb35a8bbc3d76a73ff6a9012f2756da3d7fcf2bb (diff)
downloadgobject-introspection-6ac310a3379baa34f4614f03fbd573e2ec4549f4.tar.gz
g-ir-compiler: message when arguments are wrong
Otherwise the error is "no input files" which is very confusing. https://bugzilla.gnome.org/show_bug.cgi?id=753160 Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
-rw-r--r--tools/compiler.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/compiler.c b/tools/compiler.c
index 23d76db8..88b59a04 100644
--- a/tools/compiler.c
+++ b/tools/compiler.c
@@ -153,6 +153,15 @@ main (int argc, char ** argv)
g_option_context_parse (context, &argc, &argv, &error);
g_option_context_free (context);
+ if (error)
+ {
+ g_fprintf (stderr, "error parsing arguments: %s\n", error->message);
+
+ g_error_free (error);
+
+ return 1;
+ }
+
logged_levels = G_LOG_LEVEL_MASK & ~(G_LOG_LEVEL_MESSAGE|G_LOG_LEVEL_DEBUG);
if (debug)
logged_levels = logged_levels | G_LOG_LEVEL_DEBUG;