tag/Id3Scan: remove exception handler, let caller catch
There's just one caller, i.e. ScanGenericTags(), which is documented to throw exceptions.
This commit is contained in:
@@ -28,12 +28,9 @@
|
||||
#include "util/ScopeExit.hxx"
|
||||
#include "util/StringStrip.hxx"
|
||||
#include "util/StringView.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <id3tag.h>
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -381,18 +378,11 @@ tag_id3_import(const struct id3_tag *tag) noexcept
|
||||
}
|
||||
|
||||
bool
|
||||
tag_id3_scan(InputStream &is, TagHandler &handler) noexcept
|
||||
tag_id3_scan(InputStream &is, TagHandler &handler)
|
||||
{
|
||||
UniqueId3Tag tag;
|
||||
|
||||
try {
|
||||
tag = tag_id3_load(is);
|
||||
if (!tag)
|
||||
return false;
|
||||
} catch (...) {
|
||||
LogError(std::current_exception());
|
||||
auto tag = tag_id3_load(is);
|
||||
if (!tag)
|
||||
return false;
|
||||
}
|
||||
|
||||
scan_id3_tag(tag.get(), handler);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user