Loading src/authdb.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ #include "favicon.h" #include <json-c/json.h> #include <netplus/exception.h> #ifndef _WIN32 #include <unistd.h> Loading Loading @@ -773,9 +774,14 @@ int main(int argc,char *argv[]){ pluginThreads.emplace_back([&lp, &pname](){ try { lp.instance->run(); } catch(const netplus::NetException &e) { std::cerr << "Plugin '" << pname << "' net error: " << e.what() << std::endl; } catch(const std::exception &e) { std::cerr << "Plugin '" << pname << "' error: " << e.what() << std::endl; } catch(...) { std::cerr << "Plugin '" << pname << "' unknown error" << std::endl; } }); pluginThreads.back().detach(); Loading @@ -790,10 +796,14 @@ int main(int argc,char *argv[]){ authdb::g_KdcPlugin = nullptr; authdb::g_AdPlugin = nullptr; authdb::g_PluginManager = nullptr; }catch(const netplus::NetException &e){ std::cerr << "NetException: " << e.what() << std::endl; }catch(authdb::AuthBackendError &e){ std::cerr << e.what() << std::endl; }catch(std::exception &e){ std::cerr << e.what() << std::endl; }catch(...){ std::cerr << "Unknown fatal exception" << std::endl; } return 0; } src/plugin.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include <iostream> #include <filesystem> #include <cstring> #include <netplus/exception.h> #ifdef Windows # include <windows.h> Loading Loading @@ -161,6 +162,11 @@ int PluginManager::loadAll(const std::string &directory, Plugin *instance = nullptr; try { instance = createFn(backend, configJson); } catch (const netplus::NetException &e) { std::cerr << "Plugin create failed: " << fname << ": " << e.what() << std::endl; pluginClose(handle); continue; } catch (const std::exception &e) { std::cerr << "Plugin create failed: " << fname << ": " << e.what() << std::endl; Loading Loading @@ -193,6 +199,9 @@ void PluginManager::initAll() { if (lp.instance) { try { lp.instance->init(); } catch (const netplus::NetException &e) { std::cerr << "Plugin init failed: " << name << ": " << e.what() << std::endl; } catch (const std::exception &e) { std::cerr << "Plugin init failed: " << name << ": " << e.what() << std::endl; Loading Loading
src/authdb.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ #include "favicon.h" #include <json-c/json.h> #include <netplus/exception.h> #ifndef _WIN32 #include <unistd.h> Loading Loading @@ -773,9 +774,14 @@ int main(int argc,char *argv[]){ pluginThreads.emplace_back([&lp, &pname](){ try { lp.instance->run(); } catch(const netplus::NetException &e) { std::cerr << "Plugin '" << pname << "' net error: " << e.what() << std::endl; } catch(const std::exception &e) { std::cerr << "Plugin '" << pname << "' error: " << e.what() << std::endl; } catch(...) { std::cerr << "Plugin '" << pname << "' unknown error" << std::endl; } }); pluginThreads.back().detach(); Loading @@ -790,10 +796,14 @@ int main(int argc,char *argv[]){ authdb::g_KdcPlugin = nullptr; authdb::g_AdPlugin = nullptr; authdb::g_PluginManager = nullptr; }catch(const netplus::NetException &e){ std::cerr << "NetException: " << e.what() << std::endl; }catch(authdb::AuthBackendError &e){ std::cerr << e.what() << std::endl; }catch(std::exception &e){ std::cerr << e.what() << std::endl; }catch(...){ std::cerr << "Unknown fatal exception" << std::endl; } return 0; }
src/plugin.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include <iostream> #include <filesystem> #include <cstring> #include <netplus/exception.h> #ifdef Windows # include <windows.h> Loading Loading @@ -161,6 +162,11 @@ int PluginManager::loadAll(const std::string &directory, Plugin *instance = nullptr; try { instance = createFn(backend, configJson); } catch (const netplus::NetException &e) { std::cerr << "Plugin create failed: " << fname << ": " << e.what() << std::endl; pluginClose(handle); continue; } catch (const std::exception &e) { std::cerr << "Plugin create failed: " << fname << ": " << e.what() << std::endl; Loading Loading @@ -193,6 +199,9 @@ void PluginManager::initAll() { if (lp.instance) { try { lp.instance->init(); } catch (const netplus::NetException &e) { std::cerr << "Plugin init failed: " << name << ": " << e.what() << std::endl; } catch (const std::exception &e) { std::cerr << "Plugin init failed: " << name << ": " << e.what() << std::endl; Loading