* Installs the exception handlers. */
| 975 | * Installs the exception handlers. |
| 976 | */ |
| 977 | void 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. |