Commit 85e82e3d authored by Max Kellermann's avatar Max Kellermann

decoder/List: annotate exceptions thrown by DecoderPlugin::Init()

parent f4401151
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "plugins/FluidsynthDecoderPlugin.hxx" #include "plugins/FluidsynthDecoderPlugin.hxx"
#include "plugins/SidplayDecoderPlugin.hxx" #include "plugins/SidplayDecoderPlugin.hxx"
#include "util/Macros.hxx" #include "util/Macros.hxx"
#include "util/RuntimeError.hxx"
#include <string.h> #include <string.h>
...@@ -147,8 +148,13 @@ decoder_plugin_init_all(const ConfigData &config) ...@@ -147,8 +148,13 @@ decoder_plugin_init_all(const ConfigData &config)
if (param != nullptr) if (param != nullptr)
param->SetUsed(); param->SetUsed();
try {
if (plugin.Init(*param)) if (plugin.Init(*param))
decoder_plugins_enabled[i] = true; decoder_plugins_enabled[i] = true;
} catch (...) {
std::throw_with_nested(FormatRuntimeError("Failed to initialize decoder plugin '%s'",
plugin.name));
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment