AUDIT: r16650 - gnucash/trunk/src/bin - Don't make unknown command-line arguments abort the program, just warn and exit non-zero.

Josh Sled jsled at cvs.gnucash.org
Sat Dec 15 15:06:56 EST 2007


Author: jsled
Date: 2007-12-15 15:06:56 -0500 (Sat, 15 Dec 2007)
New Revision: 16650
Trac: http://svn.gnucash.org/trac/changeset/16650

Modified:
   gnucash/trunk/src/bin/gnucash-bin.c
Log:
Don't make unknown command-line arguments abort the program, just warn and exit non-zero.
BP


Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c	2007-12-15 18:09:02 UTC (rev 16649)
+++ gnucash/trunk/src/bin/gnucash-bin.c	2007-12-15 20:06:56 UTC (rev 16650)
@@ -285,7 +285,8 @@
     g_option_context_add_group (context, gtk_get_option_group (FALSE));
     if (!g_option_context_parse (context, argc, &argv, &error))
     {
-         g_error("Error parsing command line arguments: [%s]; try `gnucash --help` for available options.", error->message);
+         g_warning("Error parsing command line arguments: [%s]; try `gnucash --help` for available options.", error->message);
+         exit(1);
     }
     g_option_context_free (context);
     if (error)



More information about the gnucash-changes mailing list