* create mu-error.h, update some functions to use GError for errors

This commit is contained in:
Dirk-Jan C. Binnema
2010-11-24 20:04:20 +02:00
parent a5b913e66c
commit e64e24aa61
12 changed files with 102 additions and 31 deletions

View File

@ -260,16 +260,21 @@ cmd_index_or_cleanup (MuConfigOptions *opts)
MuIndex *midx;
MuIndexStats stats;
gboolean show_progress;
GError *err;
g_return_val_if_fail (opts, FALSE);
g_return_val_if_fail (mu_cmd_equals (opts, "index") ||
mu_cmd_equals (opts, "cleanup"), FALSE);
if (!check_index_params (opts) || !database_version_check_and_update(opts))
if (!check_index_params (opts) ||
!database_version_check_and_update(opts))
return FALSE;
if (!(midx = mu_index_new (mu_runtime_xapian_dir()))) {
g_warning ("Indexing/Cleanup failed");
err = NULL;
if (!(midx = mu_index_new (mu_runtime_xapian_dir(), &err))) {
g_warning ("Indexing/Cleanup failed: %s",
err->message);
g_error_free (err);
return FALSE;
}