summaryrefslogtreecommitdiffhomepage
path: root/webserver.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-04-04 13:21:59 +0200
committerRoland Reichwein <mail@reichwein.it>2020-04-04 13:21:59 +0200
commit95d5acc8c7e60255b19e7084e374eb26cc5d0ba3 (patch)
treed2ebf474c5076341a30cdeb8035f1843db240d16 /webserver.cpp
parent2be63668af1cadf846ae2d44a0fd5c909ceaf47e (diff)
Versioned plugins
Diffstat (limited to 'webserver.cpp')
-rw-r--r--webserver.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/webserver.cpp b/webserver.cpp
index 2574272..3f7a2a3 100644
--- a/webserver.cpp
+++ b/webserver.cpp
@@ -33,7 +33,13 @@ int main(int argc, char* argv[])
try {
Config config{config_filename};
- load_plugins(config);
+
+ PluginLoader plugin_loader(config);
+ plugin_loader.load_plugins();
+
+ if (!plugin_loader.validate_config())
+ throw std::runtime_error("Couldn't find all configured plugins.");
+
return http_server(argc, argv);
} catch (const std::exception& ex) {
std::cout << "Error: " << ex.what() << std::endl;