diff options
author | Max Kellermann <max@musicpd.org> | 2021-03-08 22:06:28 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-03-08 22:06:29 +0100 |
commit | 3d6c9d1b88c5fd5d056b5ece27111b7178319284 (patch) | |
tree | d80ba8839b6a144ecfbc9a0abfcb214ecafd7c6f | |
parent | 5823e79fe78aaa4fd5d9a1f202ca678995a66179 (diff) |
output/wasapi: catch all exception
-rw-r--r-- | src/output/plugins/wasapi/WasapiOutputPlugin.cxx | 12 |
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(); |