mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
logger: show message popup for log_fatal (#412)
## Link to GitHub Issue, if one exists #410 ## Description of change When raising fatal errors via `log_fatal`, also show a modal popup. Update instances of `log_fatal` where the message was too long to fit. ## Testing Tested various failure conditions.
This commit is contained in:
@@ -175,17 +175,8 @@ static LONG WINAPI TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *Exception
|
||||
log_warning("signal", "minidump creation function not available, skipping");
|
||||
}
|
||||
|
||||
// reduce sleep time since we will wait for the user to acknowledge the popup
|
||||
LOG_FATAL_SLEEP = 1;
|
||||
|
||||
// in 30 seconds, shut down (in case user can't dismiss popup)
|
||||
const auto f = std::async(std::launch::async, [] {
|
||||
std::this_thread::sleep_for(std::chrono::seconds(30));
|
||||
log_fatal("signal", "end");
|
||||
});
|
||||
|
||||
// this will stall all UI threads for this process
|
||||
deferredlogs::show_popup_for_crash();
|
||||
show_popup_for_crash();
|
||||
|
||||
log_fatal("signal", "end");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user