We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21362c6 commit 74ccbabCopy full SHA for 74ccbab
1 file changed
Parser.cpp
@@ -16,6 +16,8 @@
16
*/
17
18
#include <cstdint>
19
+#include <cstdlib>
20
+#include <exception>
21
#include <string>
22
#include <iostream>
23
#include <fstream>
@@ -281,6 +283,10 @@ class ParsedTraces {
281
283
282
284
int main(int argc, char **argv)
285
{
286
+ // Replace the default terminate handler so that any unhandled exception
287
+ // causes an immediate exit with a non-zero code instead of invoking the
288
+ // platform crash reporter (WER on Windows), which would hang in CI.
289
+ std::set_terminate([]{ _exit(1); });
290
if (argc < 2)
291
throw std::runtime_error(
292
"Wrong argument. Usage: ./" + std::string(argv[0]) + " trace_directory"
0 commit comments