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/AsxPlaylistPlugin.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/playlist/AsxPlaylistPlugin.cxx')
-rw-r--r-- | src/playlist/AsxPlaylistPlugin.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/playlist/AsxPlaylistPlugin.cxx b/src/playlist/AsxPlaylistPlugin.cxx index c0a47b8e3..16b187402 100644 --- a/src/playlist/AsxPlaylistPlugin.cxx +++ b/src/playlist/AsxPlaylistPlugin.cxx @@ -23,6 +23,7 @@ #include "InputLegacy.hxx" #include "Song.hxx" #include "Tag.hxx" +#include "util/Error.hxx" #include <glib.h> @@ -208,6 +209,7 @@ asx_open_stream(struct input_stream *is) char buffer[1024]; size_t nbytes; bool success; + Error error2; GError *error = NULL; /* parse the ASX XML file */ @@ -218,12 +220,11 @@ asx_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; } |