MCPcopy Create free account
hub / github.com/Icinga/icinga2 / InstallExceptionHandlers

Method InstallExceptionHandlers

lib/base/application.cpp:977–990  ·  view source on GitHub ↗

* Installs the exception handlers. */

Source from the content-addressed store, hash-verified

975 * Installs the exception handlers.
976 */
977void Application::InstallExceptionHandlers()
978{
979 std::set_terminate(&Application::ExceptionHandler);
980
981#ifndef _WIN32
982 struct sigaction sa;
983 memset(&sa, 0, sizeof(sa));
984 sa.sa_handler = &Application::SigAbrtHandler;
985 sa.sa_flags = SA_RESTART;
986 sigaction(SIGABRT, &sa, nullptr);
987#else /* _WIN32 */
988 l_DefaultUnhandledExceptionFilter = SetUnhandledExceptionFilter(&Application::SEHUnhandledExceptionFilter);
989#endif /* _WIN32 */
990}
991
992/**
993 * Runs the application.

Callers

nothing calls this directly

Calls 1

sigactionClass · 0.70

Tested by

no test coverage detected