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/playlist/XspfPlaylistPlugin.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/playlist/XspfPlaylistPlugin.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/playlist/XspfPlaylistPlugin.cxx b/src/playlist/XspfPlaylistPlugin.cxx index c8a067da4..f2412897b 100644 --- a/src/playlist/XspfPlaylistPlugin.cxx +++ b/src/playlist/XspfPlaylistPlugin.cxx @@ -22,6 +22,7 @@ #include "MemoryPlaylistProvider.hxx" #include "InputLegacy.hxx" #include "Tag.hxx" +#include "util/Error.hxx" #include <glib.h> @@ -224,6 +225,7 @@ xspf_open_stream(struct input_stream *is) char buffer[1024]; size_t nbytes; bool success; + Error error2; GError *error = NULL; /* parse the XSPF XML file */ @@ -234,12 +236,11 @@ xspf_open_stream(struct input_stream *is) while (true) { nbytes = input_stream_lock_read(is, buffer, sizeof(buffer), - &error); + error2); if (nbytes == 0) { - if (error != NULL) { + if (error2.IsDefined()) { g_markup_parse_context_free(context); - g_warning("%s", error->message); - g_error_free(error); + g_warning("%s", error2.GetMessage()); return NULL; } |