Test cases might set the top level handler multiple times, so we have to allow that
This commit is contained in:
parent
fafbbb8e3a
commit
916632279b
@ -175,12 +175,11 @@ namespace cpputils {
|
||||
}
|
||||
|
||||
void showBacktraceOnCrash() {
|
||||
if (our_top_level_handler_set) {
|
||||
throw std::logic_error("showBackraceOnCrash: Our top level handler is already set.");
|
||||
}
|
||||
if (!our_top_level_handler_set) {
|
||||
previous_top_level_handler = SetUnhandledExceptionFilter(TopLevelExceptionHandler);
|
||||
our_top_level_handler_set = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user