blob: ee752b0239d97a70bfa1add30bcd95f1693070b8 [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>
Ed Tanous02379d32020-09-15 21:15:44 -07007#include <memory>
Gunnar Mills1214b7e2020-06-04 10:11:30 -05008#include <string>
9
Ed Tanous24b2fe82022-01-06 12:45:54 -080010int main(int /*argc*/, char** /*argv*/)
11{
12 try
13 {
14 return run();
15 }
Josh Lehan45248ba2022-07-14 14:03:29 -070016 catch (const std::exception& e)
17 {
Ed Tanous62598e32023-07-17 17:06:25 -070018 BMCWEB_LOG_CRITICAL("Threw exception to main: {}", e.what());
Josh Lehan45248ba2022-07-14 14:03:29 -070019 return -1;
20 }
Ed Tanous24b2fe82022-01-06 12:45:54 -080021 catch (...)
22 {
Ed Tanous62598e32023-07-17 17:06:25 -070023 BMCWEB_LOG_CRITICAL("Threw exception to main");
Ed Tanous6f2cd972022-06-30 18:09:06 -070024 return -1;
Ed Tanous24b2fe82022-01-06 12:45:54 -080025 }
26}