output/wasapi: catch all exception

This commit is contained in:
Max Kellermann 2021-03-08 22:06:28 +01:00
parent 5823e79fe7
commit 3d6c9d1b88

View File

@ -401,9 +401,9 @@ WasapiOutput::DoDisable() noexcept
try {
thread->Finish();
thread->Join();
} catch (std::exception &err) {
FormatError(wasapi_output_domain, "exception while disabling: %s",
err.what());
} catch (...) {
LogError(std::current_exception(),
"exception while disabling");
}
thread.reset();
client.reset();
@ -560,9 +560,9 @@ WasapiOutput::Close() noexcept
Stop(*client);
}).get();
thread->CheckException();
} catch (std::exception &err) {
FormatError(wasapi_output_domain, "exception while stoping: %s",
err.what());
} catch (...) {
FormatError(std::current_exception(),
"exception while stopping");
}
is_started = false;
thread->Finish();