Commit 17f7098e authored by Max Kellermann's avatar Max Kellermann

output/wasapi: SafeTry() catches all exceptions

Fixes crash due to std::stoul() throwing std::invalid_argument.
parent 9ff790b7
......@@ -90,8 +90,8 @@ inline bool SafeTry(Functor &&functor) {
try {
functor();
return true;
} catch (std::runtime_error &err) {
FormatError(wasapi_output_domain, "%s", err.what());
} catch (...) {
FormatError(std::current_exception(), "%s");
return false;
}
}
......@@ -101,7 +101,7 @@ inline bool SafeSilenceTry(Functor &&functor) {
try {
functor();
return true;
} catch (std::runtime_error &err) {
} catch (...) {
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment