summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webserver_main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index b68e167527..05c10cc025 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -25,6 +25,7 @@
#include <vm_websocket.hpp>
#include <webassets.hpp>
+#include <exception>
#include <memory>
#include <string>
@@ -158,6 +159,11 @@ int main(int /*argc*/, char** /*argv*/)
{
return run();
}
+ catch (const std::exception& e)
+ {
+ BMCWEB_LOG_CRITICAL << "Threw exception to main: " << e.what();
+ return -1;
+ }
catch (...)
{
BMCWEB_LOG_CRITICAL << "Threw exception to main";