diff options
author | Dan Winship <danw@gnome.org> | 2014-04-08 12:02:28 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-06-20 11:28:22 -0400 |
commit | 2d3b8f735731abf6dcbad1714e126c2ce8fc418a (patch) | |
tree | 4a65adb6a5e661d5adebb24c23cf5f01b283274d /src/settings/plugins/example/plugin.c | |
parent | a4b689096e1a9f85bb69073e0241d005025fd7b1 (diff) | |
download | NetworkManager-danw/wip/gerror.tar.gz |
all: don't include error->code in log messagesdanw/wip/gerror
GError codes are only unique per domain, so logging the code without
also indicating the domain is not helpful. And anyway, if the error
messages are not distinctive enough to tell the whole story then we
should fix the error messages.
Diffstat (limited to 'src/settings/plugins/example/plugin.c')
-rw-r--r-- | src/settings/plugins/example/plugin.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/settings/plugins/example/plugin.c b/src/settings/plugins/example/plugin.c index f0e52d95fb..622f5de9bf 100644 --- a/src/settings/plugins/example/plugin.c +++ b/src/settings/plugins/example/plugin.c @@ -157,9 +157,9 @@ read_connections (NMSystemConfigInterface *config) dir = g_dir_open (EXAMPLE_DIR, 0, &error); if (!dir) { - nm_log_warn (LOGD_SETTINGS, "Cannot read directory '%s': (%d) %s", + nm_log_warn (LOGD_SETTINGS, "Cannot read directory '%s': %s", EXAMPLE_DIR, - error->code, error->message); + error->message); g_clear_error (&error); return; } @@ -196,11 +196,10 @@ update_connection_settings_commit_cb (NMSettingsConnection *orig, GError *error, * an error here. */ if (error) { - nm_log_warn (LOGD_SETTINGS, "%s: '%s' / '%s' invalid: %d", + nm_log_warn (LOGD_SETTINGS, "%s: '%s' / '%s' invalid", __func__, g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, - error->code); + error->message); g_clear_error (&error); nm_settings_connection_signal_remove (orig); |