Loading src/blogi.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -131,10 +131,10 @@ blogi::Blogi::Blogi(std::vector<netplus::socket*> serversocket,bool debug) : Htt ctx.plgArgs->database.emplace_back(std::move(db)); } break; } catch(std::runtime_error &e) { } catch(std::exception &e) { std::cerr << "can't connect db for domain '" << dcfg.names[0] << "' (attempt " << attempt << "/" << maxRetries << "): " << e.what() << std::endl; if (attempt == maxRetries) { throw e; throw; } std::cerr << " retrying in " << retrySec << "s..." << std::endl; sleep(retrySec); Loading Loading @@ -2701,6 +2701,11 @@ public: } }catch(netplus::NetException &e){ std::cerr << e.what() << std::endl; }catch(std::exception &e){ // Catch-all (e.g. std::runtime_error from a failed DB connection in // the Blogi constructor) so the service exits cleanly instead of // aborting via std::terminate on an uncaught exception. std::cerr << "Fatal: " << e.what() << std::endl; } }; }; Loading Loading
src/blogi.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -131,10 +131,10 @@ blogi::Blogi::Blogi(std::vector<netplus::socket*> serversocket,bool debug) : Htt ctx.plgArgs->database.emplace_back(std::move(db)); } break; } catch(std::runtime_error &e) { } catch(std::exception &e) { std::cerr << "can't connect db for domain '" << dcfg.names[0] << "' (attempt " << attempt << "/" << maxRetries << "): " << e.what() << std::endl; if (attempt == maxRetries) { throw e; throw; } std::cerr << " retrying in " << retrySec << "s..." << std::endl; sleep(retrySec); Loading Loading @@ -2701,6 +2701,11 @@ public: } }catch(netplus::NetException &e){ std::cerr << e.what() << std::endl; }catch(std::exception &e){ // Catch-all (e.g. std::runtime_error from a failed DB connection in // the Blogi constructor) so the service exits cleanly instead of // aborting via std::terminate on an uncaught exception. std::cerr << "Fatal: " << e.what() << std::endl; } }; }; Loading