Main, ...: catch any exception, not just std::runtime_error

This commit is contained in:
Max Kellermann
2017-12-19 10:56:23 +01:00
parent a539094c06
commit 914df18bf9
79 changed files with 236 additions and 244 deletions

@@ -416,7 +416,7 @@ try {
assert(nbytes > 0 || is.IsEOF());
return nbytes;
} catch (const std::runtime_error &e) {
} catch (...) {
error = std::current_exception();
return 0;
}
@@ -471,7 +471,7 @@ DecoderBridge::SubmitData(InputStream *is,
auto result = convert->Convert({data, length});
data = result.data;
length = result.size;
} catch (const std::runtime_error &e) {
} catch (...) {
/* the PCM conversion has failed - stop
playback, since we have no better way to
bail out */