test/read_tags: catch exceptions from ScanFile() before falling back to ScanStream()

This commit is contained in:
Max Kellermann 2016-12-09 23:50:38 +01:00
parent 48089394a5
commit 68c14d1e53

View File

@ -101,7 +101,14 @@ try {
return EXIT_FAILURE;
}
bool success = plugin->ScanFile(path, print_handler, nullptr);
bool success;
try {
success = plugin->ScanFile(path, print_handler, nullptr);
} catch (const std::exception &e) {
LogError(e);
success = false;
}
if (!success && plugin->scan_stream != NULL) {
Mutex mutex;
Cond cond;