diff options
author | Max Kellermann <max@musicpd.org> | 2016-09-09 18:47:42 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-09-16 17:43:36 +0200 |
commit | 8c744efd5693f2a39b1441d747ebdf0d23faa308 (patch) | |
tree | ee7e99a9b1a235bc1ef554930a3c75dbfabec8d5 /src/TagStream.cxx | |
parent | 597e59f10da774c7169ee4328c874b21f71f3e60 (diff) |
input/InputStream: migrate from class Error to C++ exceptions
Diffstat (limited to 'src/TagStream.cxx')
-rw-r--r-- | src/TagStream.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/TagStream.cxx b/src/TagStream.cxx index 45b18e60f..78bed0513 100644 --- a/src/TagStream.cxx +++ b/src/TagStream.cxx @@ -31,6 +31,8 @@ #include "thread/Mutex.hxx" #include "thread/Cond.hxx" +#include <stdexcept> + #include <assert.h> /** @@ -63,7 +65,10 @@ tag_stream_scan(InputStream &is, const TagHandler &handler, void *ctx) return decoder_plugins_try([suffix, mime, &is, &handler, ctx](const DecoderPlugin &plugin){ - is.LockRewind(IgnoreError()); + try { + is.LockRewind(); + } catch (const std::runtime_error &) { + } return CheckDecoderPlugin(plugin, suffix, mime) && plugin.ScanStream(is, handler, ctx); |