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,11 +175,10 @@ namespace cpputils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showBacktraceOnCrash() {
|
void showBacktraceOnCrash() {
|
||||||
if (our_top_level_handler_set) {
|
if (!our_top_level_handler_set) {
|
||||||
throw std::logic_error("showBackraceOnCrash: Our top level handler is already set.");
|
previous_top_level_handler = SetUnhandledExceptionFilter(TopLevelExceptionHandler);
|
||||||
|
our_top_level_handler_set = true;
|
||||||
}
|
}
|
||||||
previous_top_level_handler = SetUnhandledExceptionFilter(TopLevelExceptionHandler);
|
|
||||||
our_top_level_handler_set = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user