blob: c7c7fb479afd186f0ad0f359c6d02b358d565d96 [file] [log] [blame]
Ed Tanous3ccb3ad2023-01-13 17:40:03 -08001
Ed Tanous3ccb3ad2023-01-13 17:40:03 -08002
Ed Tanous3cd70722024-04-06 09:24:01 -07003#include "logging.hpp"
4#include "webserver_run.hpp"
Ed Tanouscc5a37f2017-05-11 10:27:23 -07005
Josh Lehan45248ba2022-07-14 14:03:29 -07006#include <exception>
Gunnar Mills1214b7e2020-06-04 10:11:30 -05007
Ed Tanous24b2fe82022-01-06 12:45:54 -08008int main(int /*argc*/, char** /*argv*/)
9{
10 try
11 {
12 return run();
13 }
Josh Lehan45248ba2022-07-14 14:03:29 -070014 catch (const std::exception& e)
15 {
Ed Tanous62598e32023-07-17 17:06:25 -070016 BMCWEB_LOG_CRITICAL("Threw exception to main: {}", e.what());
Josh Lehan45248ba2022-07-14 14:03:29 -070017 return -1;
18 }
Ed Tanous24b2fe82022-01-06 12:45:54 -080019 catch (...)
20 {
Ed Tanous62598e32023-07-17 17:06:25 -070021 BMCWEB_LOG_CRITICAL("Threw exception to main");
Ed Tanous6f2cd972022-06-30 18:09:06 -070022 return -1;
Ed Tanous24b2fe82022-01-06 12:45:54 -080023 }
24}