mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
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.
This commit is contained in:
committed by
Matthias Clasen
parent
e45372895d
commit
bd8fb391aa
@@ -480,7 +480,7 @@ g_application_real_local_command_line (GApplication *application,
|
|||||||
|
|
||||||
if (!g_application_register (application, NULL, &error))
|
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);
|
g_error_free (error);
|
||||||
*exit_status = 1;
|
*exit_status = 1;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -1596,7 +1596,7 @@ g_application_run (GApplication *application,
|
|||||||
|
|
||||||
if (!g_application_register (application, NULL, &error))
|
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);
|
g_error_free (error);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user