decoder/List: annotate exceptions thrown by DecoderPlugin::Init()
This commit is contained in:
parent
f44011519c
commit
85e82e3d4d
|
@ -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)
|
||||||
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue