summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-06-26 22:02:20 +0200
committerMax Kellermann <max@musicpd.org>2019-06-26 22:02:54 +0200
commitc4d3efe71dbe96c12fb5623ed2213ed7cd998da9 (patch)
tree7cbd77ea310898e34a2ad7eff60808c05269ff63
parent85e82e3d4d7c8fa9947768c1819eeb4aa963c1bd (diff)
decoder/List: handle exception PluginUnavailable
-rw-r--r--src/decoder/DecoderList.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/decoder/DecoderList.cxx b/src/decoder/DecoderList.cxx
index 510a45e20..654f5e8f6 100644
--- a/src/decoder/DecoderList.cxx
+++ b/src/decoder/DecoderList.cxx
@@ -20,6 +20,8 @@
#include "config.h"
#include "DecoderList.hxx"
#include "DecoderPlugin.hxx"
+#include "PluginUnavailable.hxx"
+#include "Log.hxx"
#include "config/Data.hxx"
#include "config/Block.hxx"
#include "plugins/AudiofileDecoderPlugin.hxx"
@@ -151,6 +153,10 @@ decoder_plugin_init_all(const ConfigData &config)
try {
if (plugin.Init(*param))
decoder_plugins_enabled[i] = true;
+ } catch (const PluginUnavailable &e) {
+ FormatError(e,
+ "Decoder plugin '%s' is unavailable",
+ plugin.name);
} catch (...) {
std::throw_with_nested(FormatRuntimeError("Failed to initialize decoder plugin '%s'",
plugin.name));