2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2016-09-09 15:11:52 +02:00
|
|
|
|
|
|
|
#ifndef MPD_PLUGIN_UNAVAILABLE_HXX
|
|
|
|
#define MPD_PLUGIN_UNAVAILABLE_HXX
|
|
|
|
|
|
|
|
#include <stdexcept>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An exception class which is used by plugin initializers to indicate
|
|
|
|
* that this plugin is unavailable. It will be disabled, and MPD can
|
|
|
|
* continue initialization.
|
|
|
|
*/
|
2019-05-22 18:04:11 +02:00
|
|
|
class PluginUnavailable : public std::runtime_error {
|
2016-09-09 15:11:52 +02:00
|
|
|
public:
|
2020-07-06 20:40:07 +02:00
|
|
|
using std::runtime_error::runtime_error;
|
2016-09-09 15:11:52 +02:00
|
|
|
};
|
|
|
|
|
2019-05-22 18:04:11 +02:00
|
|
|
/**
|
|
|
|
* Like #PluginUnavailable, but denotes that the plugin is not
|
|
|
|
* available because it was not explicitly enabled in the
|
|
|
|
* configuration. The message may describe the necessary steps to
|
|
|
|
* enable it.
|
|
|
|
*/
|
|
|
|
class PluginUnconfigured : public PluginUnavailable {
|
|
|
|
public:
|
2020-07-06 20:45:29 +02:00
|
|
|
using PluginUnavailable::PluginUnavailable;
|
2019-05-22 18:04:11 +02:00
|
|
|
};
|
|
|
|
|
2016-09-09 15:11:52 +02:00
|
|
|
#endif
|