From 29030b54c98b0aee65fbc10ebf7ba36bed98c02c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Aug 2013 18:02:44 +0200 Subject: util/Error: new error passing library Replaces GLib's GError. --- src/UpdateGlue.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/UpdateGlue.cxx') diff --git a/src/UpdateGlue.cxx b/src/UpdateGlue.cxx index da8f92739..972842bb1 100644 --- a/src/UpdateGlue.cxx +++ b/src/UpdateGlue.cxx @@ -26,6 +26,7 @@ #include "DatabaseSimple.hxx" #include "Idle.hxx" #include "GlobalEvents.hxx" +#include "util/Error.hxx" extern "C" { #include "stats.h" @@ -77,12 +78,10 @@ static void * update_task(void *_path) modified = update_walk(path, discard); if (modified || !db_exists()) { - GError *error = NULL; - if (!db_save(&error)) { + Error error; + if (!db_save(error)) g_warning("Failed to save database: %s", - error->message); - g_error_free(error); - } + error.GetMessage()); } if (path != NULL && *path != 0) -- cgit v1.2.3