summaryrefslogtreecommitdiff
path: root/src/playlist/PlaylistStream.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-09-09 15:37:06 +0200
committerMax Kellermann <max@musicpd.org>2016-09-09 18:15:01 +0200
commitfc7d3f64c007672e4c01172ccb1c46d083a8abd5 (patch)
tree3c72f16ee6cc919a17558678a1e270568182b8af /src/playlist/PlaylistStream.cxx
parent63ab7767a37a99b5651f32e067aeb5fcbb7bd033 (diff)
input/Plugin: migrate open() from class Error to C++ exceptions
Diffstat (limited to 'src/playlist/PlaylistStream.cxx')
-rw-r--r--src/playlist/PlaylistStream.cxx18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/playlist/PlaylistStream.cxx b/src/playlist/PlaylistStream.cxx
index 37d7663de..fc3a5586b 100644
--- a/src/playlist/PlaylistStream.cxx
+++ b/src/playlist/PlaylistStream.cxx
@@ -44,13 +44,7 @@ try {
if (!playlist_suffix_supported(suffix_utf8.c_str()))
return nullptr;
- Error error;
- auto is = OpenLocalInputStream(path, mutex, cond, error);
- if (is == nullptr) {
- LogError(error);
- return nullptr;
- }
-
+ auto is = OpenLocalInputStream(path, mutex, cond);
return playlist_list_open_stream_suffix(std::move(is),
suffix_utf8.c_str());
} catch (const std::runtime_error &e) {
@@ -85,15 +79,7 @@ try {
if (playlist != nullptr)
return playlist;
- Error error;
- auto is = InputStream::OpenReady(uri, mutex, cond, error);
- if (is == nullptr) {
- if (error.IsDefined())
- FormatError(error, "Failed to open %s", uri);
-
- return nullptr;
- }
-
+ auto is = InputStream::OpenReady(uri, mutex, cond);
return playlist_list_open_stream(std::move(is), uri);
} catch (const std::runtime_error &e) {
LogError(e);