application: Use printerr for runtime errors
authorChristian Persch <chpe@gnome.org>
Thu, 24 May 2012 17:18:44 +0000 (19:18 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 23 Nov 2013 23:16:41 +0000 (18:16 -0500)
g_critical can be fatal (with --g-fatal-warnings, or some env var set),
so don't use it to print out runtime errors.

Bug #676761.

gio/gapplication.c

index 0098281..40d8393 100644 (file)
@@ -480,7 +480,7 @@ g_application_real_local_command_line (GApplication   *application,
 
       if (!g_application_register (application, NULL, &error))
         {
-          g_critical ("%s", error->message);
+          g_printerr ("Failed to register: %s\n", error->message);
           g_error_free (error);
           *exit_status = 1;
           return TRUE;
@@ -1596,7 +1596,7 @@ g_application_run (GApplication  *application,
 
       if (!g_application_register (application, NULL, &error))
         {
-          g_printerr ("%s", error->message);
+          g_printerr ("Failed to register: %s\n", error->message);
           g_error_free (error);
           return 1;
         }