all: don't include error->code in log messages

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.

Based-on-patch-by: Dan Winship <danw@gnome.org>
This commit is contained in:
Thomas Haller
2016-02-28 18:12:28 +01:00
parent 6265398b6e
commit cd4f84b738
34 changed files with 95 additions and 126 deletions

View File

@@ -358,8 +358,7 @@ main (int argc, char *argv[])
nm_config_cmd_line_options_free (config_cli);
config_cli = NULL;
if (config == NULL) {
fprintf (stderr, _("Failed to read configuration: (%d) %s\n"),
error->code,
fprintf (stderr, _("Failed to read configuration: %s\n"),
error->message);
exit (1);
}
@@ -412,9 +411,8 @@ main (int argc, char *argv[])
/* Parse the state file */
if (!parse_state_file (global_opt.state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &error)) {
nm_log_err (LOGD_CORE, "State file %s parsing failed: (%d) %s",
nm_log_err (LOGD_CORE, "State file %s parsing failed: %s",
global_opt.state_file,
error->code,
error->message);
/* Not a hard failure */
}