diff --git a/src/input/plugins/SmbclientInputPlugin.cxx b/src/input/plugins/SmbclientInputPlugin.cxx index 4469dbab5..b4b0785f8 100644 --- a/src/input/plugins/SmbclientInputPlugin.cxx +++ b/src/input/plugins/SmbclientInputPlugin.cxx @@ -28,8 +28,6 @@ #include -#include - class SmbclientInputStream final : public InputStream { SMBCCTX *ctx; int fd; @@ -72,9 +70,8 @@ input_smbclient_init(EventLoop &, const ConfigBlock &) { try { SmbclientInit(); - } catch (const std::runtime_error &e) { - // TODO: use std::throw_with_nested()? - throw PluginUnavailable(e.what()); + } catch (...) { + std::throw_with_nested(PluginUnavailable("libsmbclient initialization failed")); } // TODO: create one global SMBCCTX here?