From 1f33446e1fae721cc6c8f260afe2ebfa42dd51c8 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 29 Nov 2011 21:45:37 +0100 Subject: [PATCH] gnetworkmonitornetlink.c: Make the error messages less geeky This makes several different errors have identical messages, but they're pretty much "can't happen" situations anyway. https://bugzilla.gnome.org/show_bug.cgi?id=664406 --- gio/gnetworkmonitornetlink.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gio/gnetworkmonitornetlink.c b/gio/gnetworkmonitornetlink.c index da60b8ae2..ede811112 100644 --- a/gio/gnetworkmonitornetlink.c +++ b/gio/gnetworkmonitornetlink.c @@ -91,7 +91,7 @@ g_network_monitor_netlink_initable_init (GInitable *initable, { int errsv = errno; g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv), - _("Could not create netlink socket: %s"), + _("Could not create network monitor: %s"), g_strerror (errno)); return FALSE; } @@ -103,7 +103,7 @@ g_network_monitor_netlink_initable_init (GInitable *initable, { int errsv = errno; g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv), - _("Could not bind netlink socket: %s"), + _("Could not create network monitor: %s"), g_strerror (errno)); close (sockfd); return FALSE; @@ -114,7 +114,7 @@ g_network_monitor_netlink_initable_init (GInitable *initable, { int errsv = errno; g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv), - _("Could not set options on netlink socket: %s"), + _("Could not create network monitor: %s"), g_strerror (errno)); close (sockfd); return FALSE; @@ -123,7 +123,7 @@ g_network_monitor_netlink_initable_init (GInitable *initable, nl->priv->sock = g_socket_new_from_fd (sockfd, error); if (error) { - g_prefix_error (error, "%s", _("Could not wrap netlink socket: ")); + g_prefix_error (error, "%s", _("Could not create network monitor: ")); close (sockfd); return FALSE; } @@ -171,7 +171,7 @@ request_dump (GNetworkMonitorNetlink *nl, if (g_socket_send (nl->priv->sock, buf, sizeof (buf), NULL, error) < 0) { - g_prefix_error (error, "%s", _("Could not send netlink request: ")); + g_prefix_error (error, "%s", _("Could not get network status: ")); return FALSE; }