diff options
author | Max Kellermann <max@musicpd.org> | 2019-06-26 22:02:20 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-06-26 22:02:54 +0200 |
commit | c4d3efe71dbe96c12fb5623ed2213ed7cd998da9 (patch) | |
tree | 7cbd77ea310898e34a2ad7eff60808c05269ff63 /src/decoder | |
parent | 85e82e3d4d7c8fa9947768c1819eeb4aa963c1bd (diff) |
decoder/List: handle exception PluginUnavailable
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/DecoderList.cxx | 6 |
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)); |