◆ ErrorSignalHandler()
| Scroom::Utils::Detail::ErrorSignalHandler::ErrorSignalHandler |
( |
| ) |
|
|
noexcept |
116 {
121#ifndef _WIN32
124#endif
125 }
Semaphore signal
Definition async-deleter-tests.cc:64
static void handler(int)
Definition assertions.cc:78
◆ handler()
| void Scroom::Utils::Detail::ErrorSignalHandler::handler |
( |
int |
sig | ) |
|
|
staticprivate |
79 {
81 {
83 std::cerr << __FILE__ << ":" << __LINE__ << ": Entering signal handler" << std::endl;
84#ifdef _WIN32
85 std::string_view sigName;
86 switch(sig)
87 {
88 case SIGFPE:
89 sigName = "SIGFPE";
90 break;
91 case SIGILL:
92 sigName = "SIGILL";
93 break;
94 case SIGABRT:
95 sigName = "SIGABRT";
96 break;
97 case SIGSEGV:
98 sigName = "SIGSEGV";
99 break;
100 }
101#else
102 std::string_view const sigName = strsignal(sig);
103#endif
104 std::cerr << "PROGRAM DEFECTIVE (TERMINATED BY SIGNAL): " << sigName << std::endl;
106 std::cerr << std::endl;
107 std::cerr << __FILE__ << ":" << __LINE__ << ": Leaving signal handler" << std::endl;
108 std::cerr << std::flush;
109 }
110
112 raise(sig);
113 }
static volatile sig_atomic_t isHandlerActive
Definition assertions.cc:69
std::string stackTrace(size_t cutoff)
Definition assertions.cc:26
Referenced by ErrorSignalHandler().
◆ abort
130 {
134 }
friend void abort()
Definition assertions.cc:129
static ErrorSignalHandler errorSignalHandler
Definition assertions.cc:127
◆ isHandlerActive
| volatile sig_atomic_t Scroom::Utils::Detail::ErrorSignalHandler::isHandlerActive = 0 |
|
staticprivate |
The documentation for this class was generated from the following file: