diff options
author | Max Kellermann <max@duempel.org> | 2013-08-10 18:02:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-04 18:14:22 +0200 |
commit | 29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch) | |
tree | 79766830b55ebca38ddbce84d8d548227eedb69e /src/UpdateGlue.cxx | |
parent | c9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff) | |
download | mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip |
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to '')
-rw-r--r-- | src/UpdateGlue.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
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) |