r16657 - gnucash/branches/2.2/src/bin - [r16650] Don't make unknown command-line arguments abort the program, just warn and exit non-zero.

Andreas Köhler andi5 at cvs.gnucash.org
Sat Dec 15 17:37:12 EST 2007


Author: andi5
Date: 2007-12-15 17:37:12 -0500 (Sat, 15 Dec 2007)
New Revision: 16657
Trac: http://svn.gnucash.org/trac/changeset/16657

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


Modified: gnucash/branches/2.2/src/bin/gnucash-bin.c
===================================================================
--- gnucash/branches/2.2/src/bin/gnucash-bin.c	2007-12-15 22:32:43 UTC (rev 16656)
+++ gnucash/branches/2.2/src/bin/gnucash-bin.c	2007-12-15 22:37:12 UTC (rev 16657)
@@ -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