summaryrefslogtreecommitdiff
path: root/src/TagStream.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-05-21 23:07:49 +0200
committerMax Kellermann <max@musicpd.org>2019-05-22 10:19:26 +0200
commit6f1d5105ee61b1304948c41047c9c63de4ef2fbb (patch)
treef38d3d2ce64609e53dd1ae0de46d9e7b62421d8d /src/TagStream.cxx
parent9a78371b5c1a38c1b8cc89e0aefd3985fdc0698a (diff)
TagStream: allow tag_stream_scan() to throw
Diffstat (limited to 'src/TagStream.cxx')
-rw-r--r--src/TagStream.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/TagStream.cxx b/src/TagStream.cxx
index 0cedc72cc..bed542a10 100644
--- a/src/TagStream.cxx
+++ b/src/TagStream.cxx
@@ -73,14 +73,12 @@ tag_stream_scan(InputStream &is, TagHandler &handler) noexcept
}
bool
-tag_stream_scan(const char *uri, TagHandler &handler) noexcept
-try {
+tag_stream_scan(const char *uri, TagHandler &handler)
+{
Mutex mutex;
auto is = InputStream::OpenReady(uri, mutex);
return tag_stream_scan(*is, handler);
-} catch (const std::exception &e) {
- return false;
}
bool
@@ -102,12 +100,10 @@ tag_stream_scan(InputStream &is, TagBuilder &builder,
bool
tag_stream_scan(const char *uri, TagBuilder &builder,
- AudioFormat *audio_format) noexcept
-try {
+ AudioFormat *audio_format)
+{
Mutex mutex;
auto is = InputStream::OpenReady(uri, mutex);
return tag_stream_scan(*is, builder, audio_format);
-} catch (const std::exception &e) {
- return false;
}