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/QueueSave.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/QueueSave.cxx') 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 @@ -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; } -- cgit v1.2.3