[glib] application: Use printerr for runtime errors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] application: Use printerr for runtime errors
- Date: Sat, 23 Nov 2013 23:16:49 +0000 (UTC)
commit bd8fb391aa71a7693302dfe4f27ca10bab82c68a
Author: Christian Persch <chpe gnome org>
Date: Thu May 24 19:18:44 2012 +0200
application: Use printerr for runtime errors
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 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 0098281..40d8393 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]