mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 15:46:17 +01:00
Update the example to demonstrate error handling. (#497033, Matti Katila)
2007-11-18 Matthias Clasen <mclasen@redhat.com> * glib/tmpl/option.sgml: Update the example to demonstrate error handling. (#497033, Matti Katila) svn path=/trunk/; revision=5865
This commit is contained in:
parent
29a0692575
commit
5b918f8ddc
@ -1,3 +1,8 @@
|
||||
2007-11-18 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/tmpl/option.sgml: Update the example to demonstrate
|
||||
error handling. (#497033, Matti Katila)
|
||||
|
||||
2007-11-09 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glib/tmpl/patterns.sgml: Add a warning about strlen vs
|
||||
|
@ -114,8 +114,12 @@ main (int argc, char *argv[])
|
||||
context = g_option_context_new ("- test tree model performance");
|
||||
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
|
||||
g_option_context_add_group (context, gtk_get_option_group (TRUE));
|
||||
g_option_context_parse (context, &argc, &argv, &error);
|
||||
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
g_print ("option parsing failed: %s\n", error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* ... */
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user