summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-03-08 22:06:28 +0100
committerMax Kellermann <max@musicpd.org>2021-03-08 22:06:29 +0100
commit3d6c9d1b88c5fd5d056b5ece27111b7178319284 (patch)
treed80ba8839b6a144ecfbc9a0abfcb214ecafd7c6f
parent5823e79fe78aaa4fd5d9a1f202ca678995a66179 (diff)
output/wasapi: catch all exception
-rw-r--r--src/output/plugins/wasapi/WasapiOutputPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
index ec3ec6a56..4c7353c18 100644
--- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
@@ -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();