input/Plugin: migrate init() from class Error to C++ exceptions
This commit is contained in:
@@ -40,20 +40,6 @@ class Error;
|
||||
struct Tag;
|
||||
|
||||
struct InputPlugin {
|
||||
enum class InitResult {
|
||||
/**
|
||||
* A fatal error has occurred (e.g. misconfiguration).
|
||||
* The #Error has been set.
|
||||
*/
|
||||
ERROR,
|
||||
|
||||
/**
|
||||
* The plugin was initialized successfully and is
|
||||
* ready to be used.
|
||||
*/
|
||||
SUCCESS,
|
||||
};
|
||||
|
||||
const char *name;
|
||||
|
||||
/**
|
||||
@@ -61,8 +47,10 @@ struct InputPlugin {
|
||||
*
|
||||
* Throws #PluginUnavailable if the plugin is not available
|
||||
* and shall be disabled.
|
||||
*
|
||||
* Throws std::runtime_error on (fatal) error.
|
||||
*/
|
||||
InitResult (*init)(const ConfigBlock &block, Error &error);
|
||||
void (*init)(const ConfigBlock &block);
|
||||
|
||||
/**
|
||||
* Global deinitialization. Called once before MPD shuts
|
||||
|
Reference in New Issue
Block a user