db/Plugin: migrate from class Error to C++ exceptions

This commit is contained in:
Max Kellermann
2016-10-28 23:03:07 +02:00
parent 7e5ce623fe
commit dea46e8d5a
7 changed files with 31 additions and 61 deletions

View File

@@ -27,7 +27,6 @@
#define MPD_DATABASE_PLUGIN_HXX
struct ConfigBlock;
class Error;
class EventLoop;
class DatabaseListener;
class Database;
@@ -45,10 +44,11 @@ struct DatabasePlugin {
/**
* Allocates and configures a database.
*
* Throws #std::runtime_error on error.
*/
Database *(*create)(EventLoop &loop, DatabaseListener &listener,
const ConfigBlock &block,
Error &error);
const ConfigBlock &block);
constexpr bool RequireStorage() const {
return flags & FLAG_REQUIRE_STORAGE;