From 3d6c9d1b88c5fd5d056b5ece27111b7178319284 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 8 Mar 2021 22:06:28 +0100 Subject: [PATCH] output/wasapi: catch all exception --- src/output/plugins/wasapi/WasapiOutputPlugin.cxx | 12 ++++++------ 1 file 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();