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/QueueSave.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 'src/QueueSave.cxx')
-rw-r--r-- | src/QueueSave.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/QueueSave.cxx b/src/QueueSave.cxx index fd00009b1..a9c4b4cff 100644 --- a/src/QueueSave.cxx +++ b/src/QueueSave.cxx @@ -26,6 +26,7 @@ #include "DatabaseGlue.hxx" #include "TextFile.hxx" #include "util/UriUtil.hxx" +#include "util/Error.hxx" #include <stdlib.h> @@ -90,11 +91,10 @@ queue_load_song(TextFile &file, const char *line, queue *queue) if (!uri_has_scheme(uri) && !g_path_is_absolute(uri)) return; - GError *error = NULL; - song = song_load(file, NULL, uri, &error); + Error error; + song = song_load(file, NULL, uri, error); if (song == NULL) { - g_warning("%s", error->message); - g_error_free(error); + g_warning("%s", error.GetMessage()); return; } } else { @@ -110,11 +110,11 @@ queue_load_song(TextFile &file, const char *line, queue *queue) if (uri_has_scheme(uri)) { song = Song::NewRemote(uri); } else { - db = GetDatabase(nullptr); + db = GetDatabase(IgnoreError()); if (db == nullptr) return; - song = db->GetSong(uri, nullptr); + song = db->GetSong(uri, IgnoreError()); if (song == nullptr) return; } |