* unify error printing a bit (starting with lowercase)

This commit is contained in:
Dirk-Jan C. Binnema 2010-11-30 22:20:27 +02:00
parent bc039e22d6
commit ba2918ca41
10 changed files with 23 additions and 23 deletions

View File

@ -140,7 +140,7 @@ save_parts (const char *path, MuConfigOptions *opts)
err = NULL;
msg = mu_msg_new (path, NULL, &err);
if (!msg) {
g_warning ("Error: %s", err->message);
g_warning ("error: %s", err->message);
g_error_free (err);
return FALSE;
}
@ -187,7 +187,7 @@ show_parts (const char* path, MuConfigOptions *opts)
err = NULL;
msg = mu_msg_new (path, NULL, &err);
if (!msg) {
g_warning ("Error: %s", err->message);
g_warning ("error: %s", err->message);
g_error_free (err);
return FALSE;
}

View File

@ -89,7 +89,7 @@ sort_field_from_string (const char* fieldstr)
mfid = mu_msg_field_id_from_shortcut(fieldstr[0],
FALSE);
if (mfid == MU_MSG_FIELD_ID_NONE)
g_warning ("Not a valid sort field: '%s'\n",
g_warning ("not a valid sort field: '%s'\n",
fieldstr);
return mfid;
}
@ -169,7 +169,7 @@ run_query (MuQuery *xapian, const gchar *query, MuConfigOptions *opts)
opts->summary_len);
if (matches == 0)
g_warning ("No matches found");
g_warning ("no matches found");
mu_msg_iter_destroy (iter);
@ -194,7 +194,7 @@ query_params_valid (MuConfigOptions *opts)
return TRUE;
g_warning ("'%s' is not a readable Xapian directory\n", xpath);
g_message ("Did you run 'mu index'?");
g_message ("did you run 'mu index'?");
return FALSE;
}

View File

@ -41,9 +41,9 @@ static gboolean MU_CAUGHT_SIGNAL;
static void
update_warning (void)
{
g_warning ("Note: the database needs to be upgraded to version %s",
g_warning ("note: the database needs to be upgraded to version %s",
MU_XAPIAN_DB_VERSION);
g_warning ("Please run 'mu index --rebuild' (see the manpage)");
g_warning ("please run 'mu index --rebuild' (see the manpage)");
}
static void
@ -51,7 +51,7 @@ sig_handler (int sig)
{
if (!MU_CAUGHT_SIGNAL && sig == SIGINT) { /* Ctrl-C */
g_print ("\n");
g_warning ("Shutting down gracefully, "
g_warning ("shutting down gracefully, "
"press again to kill immediately");
}
@ -165,7 +165,7 @@ database_version_check_and_update (MuConfigOptions *opts)
* anything */
if (opts->rebuild) {
opts->reindex = TRUE;
g_message ("Clearing database %s", xpath);
g_message ("clearing database %s", xpath);
return mu_util_clear_database (xpath);
}
@ -175,7 +175,7 @@ database_version_check_and_update (MuConfigOptions *opts)
/* ok, database is not up to date */
if (opts->autoupgrade) {
opts->reindex = TRUE;
g_message ("Auto-upgrade: clearing old database first");
g_message ("auto-upgrade: clearing old database first");
return mu_util_clear_database (xpath);
}
@ -188,10 +188,10 @@ static void
show_time (unsigned t, unsigned processed)
{
if (t)
g_message ("Elapsed: %u second(s), ~ %u msg/s",
g_message ("elapsed: %u second(s), ~ %u msg/s",
t, processed/t);
else
g_message ("Elapsed: %u second(s)", t);
g_message ("elapsed: %u second(s)", t);
}
@ -203,7 +203,7 @@ cmd_cleanup (MuIndex *midx, MuConfigOptions *opts, MuIndexStats *stats,
MuResult rv;
time_t t;
g_message ("Cleaning up messages [%s]", mu_runtime_xapian_dir());
g_message ("cleaning up messages [%s]", mu_runtime_xapian_dir());
t = time (NULL);
rv = mu_index_cleanup (midx, stats,
@ -228,7 +228,7 @@ cmd_index (MuIndex *midx, MuConfigOptions *opts, MuIndexStats *stats,
MuResult rv;
time_t t;
g_message ("Indexing messages under %s [%s]", opts->maildir,
g_message ("indexing messages under %s [%s]", opts->maildir,
mu_runtime_xapian_dir());
t = time (NULL);
@ -279,7 +279,7 @@ cmd_index_or_cleanup (MuConfigOptions *opts)
err = NULL;
if (!(midx = mu_index_new (mu_runtime_xapian_dir(), &err))) {
g_warning ("Indexing/Cleanup failed: %s",
g_warning ("index/cleanup failed: %s",
err->message);
g_error_free (err);
return FALSE;

View File

@ -83,7 +83,7 @@ mu_cmd_view (MuConfigOptions *opts)
GError *err = NULL;
MuMsg *msg = mu_msg_new (opts->params[i], NULL, &err);
if (!msg) {
g_warning ("Error: %s", err->message);
g_warning ("error: %s", err->message);
g_error_free (err);
return FALSE;
}

View File

@ -162,7 +162,7 @@ run_msg_callback_maybe (MuIndexCallbackData *data)
result = data->_idx_msg_cb (data->_stats, data->_user_data);
if G_UNLIKELY((result != MU_OK && result != MU_STOP))
g_warning ("Error in callback");
g_warning ("error in callback");
return result;
}

View File

@ -127,7 +127,7 @@ move_log_file (const char *logfile)
g_free (logfile_old);
if (rv != 0) {
g_warning ("Failed to move %s to %s.old: %s",
g_warning ("failed to move %s to %s.old: %s",
logfile, logfile, strerror(rv));
return FALSE;
} else

View File

@ -195,7 +195,7 @@ mu_maildir_link (const char* src, const char *targetpath)
rv = symlink (src, targetfullpath);
if (rv != 0) {
g_warning ("Error creating link %s => %s: %s",
g_warning ("error creating link %s => %s: %s",
targetfullpath, src,
strerror (errno));
g_free (targetfullpath);

View File

@ -383,7 +383,7 @@ get_content_flags (MuMsg *msg)
flags |= MU_MSG_FLAG_ENCRYPTED;
}
} else
g_warning ("No top level mime part ?!");
g_warning ("no top level mime part found");
return flags;
}

View File

@ -68,10 +68,10 @@ mu_output_link_row (MuMsgIter *iter, const char* linksdir)
/* this might happen if the database is not up-to-date, not an error */
if (access (path, R_OK) != 0) {
if (errno == ENOENT)
g_warning ("Cannot find source message %s: "
g_warning ("cannot find source message %s: "
"the database is not up-to-date", path);
else
g_warning ("Cannot read source message %s: %s", path,
g_warning ("cannot read source message %s: %s", path,
strerror (errno));
return FALSE;
}

View File

@ -203,7 +203,7 @@ mu_util_create_dir_maybe (const gchar *path)
if (stat (path, &statbuf) == 0) {
if ((!S_ISDIR(statbuf.st_mode)) ||
(access (path, W_OK|R_OK) != 0)) {
g_warning ("Not a rw-directory: %s", path);
g_warning ("not a rw-directory: %s", path);
return FALSE;
}
}