summaryrefslogtreecommitdiff
path: root/src/TagFile.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-05-21 23:24:44 +0200
committerMax Kellermann <max@musicpd.org>2019-05-22 10:19:27 +0200
commit92f7421715584c3aeb48b11505bec39329ed5d0f (patch)
treeebf424789597dc1ac7220222336a6754e1400dfe /src/TagFile.cxx
parent6f1d5105ee61b1304948c41047c9c63de4ef2fbb (diff)
TagFile: allow ScanFileTags*() to throw
Diffstat (limited to 'src/TagFile.cxx')
-rw-r--r--src/TagFile.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/TagFile.cxx b/src/TagFile.cxx
index f30037481..446f63c0b 100644
--- a/src/TagFile.cxx
+++ b/src/TagFile.cxx
@@ -51,36 +51,29 @@ public:
return plugin.ScanFile(path_fs, handler);
}
- bool ScanStream(const DecoderPlugin &plugin) noexcept {
+ bool ScanStream(const DecoderPlugin &plugin) {
if (plugin.scan_stream == nullptr)
return false;
/* open the InputStream (if not already open) */
if (is == nullptr) {
- try {
- is = OpenLocalInputStream(path_fs, mutex);
- } catch (...) {
- return false;
- }
+ is = OpenLocalInputStream(path_fs, mutex);
} else {
- try {
- is->LockRewind();
- } catch (...) {
- }
+ is->LockRewind();
}
/* now try the stream_tag() method */
return plugin.ScanStream(*is, handler);
}
- bool Scan(const DecoderPlugin &plugin) noexcept {
+ bool Scan(const DecoderPlugin &plugin) {
return plugin.SupportsSuffix(suffix) &&
(ScanFile(plugin) || ScanStream(plugin));
}
};
bool
-ScanFileTagsNoGeneric(Path path_fs, TagHandler &handler) noexcept
+ScanFileTagsNoGeneric(Path path_fs, TagHandler &handler)
{
assert(!path_fs.IsNull());
@@ -100,7 +93,7 @@ ScanFileTagsNoGeneric(Path path_fs, TagHandler &handler) noexcept
bool
ScanFileTagsWithGeneric(Path path, TagBuilder &builder,
- AudioFormat *audio_format) noexcept
+ AudioFormat *audio_format)
{
FullTagHandler h(builder, audio_format);