From 3ce704e7614ba44a2f8efc9f771d7b4585897b6a Mon Sep 17 00:00:00 2001 From: Master_Laplace Date: Mon, 8 Jan 2024 09:12:39 +0100 Subject: [PATCH] update(Flakkari): Handle exception in main function --- Flakkari/core.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Flakkari/core.cpp b/Flakkari/core.cpp index bfecf2f1..4edaa243 100644 --- a/Flakkari/core.cpp +++ b/Flakkari/core.cpp @@ -9,7 +9,12 @@ int main() { - Flakkari::UDPServer server("localhost", 8080); + try { + Flakkari::UDPServer server("localhost", 8080); server.run(); + } catch (const std::exception &e) { + if (std::string(e.what()) != "exit") + return FLAKKARI_LOG_FATAL(e.what()), 84; + } return 0; }