gsettings tool: print GVariant errors in context
authorRyan Lortie <desrt@desrt.ca>
Fri, 22 Nov 2013 17:55:10 +0000 (12:55 -0500)
committerRyan Lortie <desrt@desrt.ca>
Sun, 22 Dec 2013 16:41:43 +0000 (11:41 -0500)
Use g_variant_parse_error_print_context() to format the error message
from the GVariant parser.

https://bugzilla.gnome.org/show_bug.cgi?id=715028

gio/gsettings-tool.c

index 24c2694..451dcf1 100644 (file)
@@ -467,7 +467,10 @@ gsettings_set (void)
 
   if (new == NULL)
     {
-      g_printerr ("%s\n", error->message);
+      gchar *context;
+
+      context = g_variant_parse_error_print_context (error, global_value);
+      g_printerr ("%s", context);
       exit (1);
     }