From 001b3e154bffdd301c6dc3ba99c2acf3e04a9588 Mon Sep 17 00:00:00 2001 From: hi <13748681+sovissa@users.noreply.github.com> Date: Tue, 19 Aug 2025 17:11:26 +0300 Subject: [PATCH] catch c++ exceptions in main --- src/bin/entry.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/entry.cpp b/src/bin/entry.cpp index 9d217e3..39ed27f 100644 --- a/src/bin/entry.cpp +++ b/src/bin/entry.cpp @@ -53,6 +53,9 @@ int main(const int argc, const char* argv[]) try { auto config = config_parser::from_argv(argc, argv); return startup(config); +} catch (const std::exception& e) { + logger::critical("{}", e.what()); + return 1; } catch (...) { logger::critical("Unknown runtime error"); return 1;