diff options
author | Max Kellermann <max@musicpd.org> | 2019-03-29 17:33:11 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-03-29 17:34:51 +0100 |
commit | 5201147ab1f13eb57eb5d726eb44af97de526e35 (patch) | |
tree | 5779c83ddc1ae7fe4fc128a0460e5611117d95c8 /src | |
parent | fb7daa0d059110297b975a830043ec700e510c0c (diff) |
input/curl: use std::throw_with_nested() instead of logging the exception
Let the caller decide what to do with the original exception.
Diffstat (limited to 'src')
-rw-r--r-- | src/input/plugins/CurlInputPlugin.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index 74d28fde0..b16f1eb84 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -306,9 +306,8 @@ input_curl_init(EventLoop &event_loop, const ConfigBlock &block) { try { curl_init = new CurlInit(event_loop); - } catch (const std::runtime_error &e) { - LogError(e); - throw PluginUnavailable(e.what()); + } catch (...) { + std::throw_with_nested(PluginUnavailable("CURL initialization failed")); } const auto version_info = curl_version_info(CURLVERSION_FIRST); |