fix: Reverted back reordering of crash callback call
This commit is contained in:
parent
da137b3e3b
commit
54c6c9360a
@ -55,14 +55,14 @@ namespace hex::crash {
|
|||||||
static void signalHandler(int signalNumber, const std::string &signalName) {
|
static void signalHandler(int signalNumber, const std::string &signalName) {
|
||||||
log::fatal("Terminating with signal '{}' ({})", signalName, signalNumber);
|
log::fatal("Terminating with signal '{}' ({})", signalName, signalNumber);
|
||||||
|
|
||||||
|
// Trigger the crash callback
|
||||||
|
crashCallback(hex::format("Received signal '{}' ({})", signalName, signalNumber));
|
||||||
|
|
||||||
// Trigger an event so that plugins can handle crashes
|
// Trigger an event so that plugins can handle crashes
|
||||||
// It may affect things (like the project path),
|
// It may affect things (like the project path),
|
||||||
// so we do this after saving the crash file
|
// so we do this after saving the crash file
|
||||||
EventManager::post<EventAbnormalTermination>(signalNumber);
|
EventManager::post<EventAbnormalTermination>(signalNumber);
|
||||||
|
|
||||||
// Trigger the crash callback
|
|
||||||
crashCallback(hex::format("Received signal '{}' ({})", signalName, signalNumber));
|
|
||||||
|
|
||||||
// Detect if the crash was due to an uncaught exception
|
// Detect if the crash was due to an uncaught exception
|
||||||
if (std::uncaught_exceptions() > 0) {
|
if (std::uncaught_exceptions() > 0) {
|
||||||
log::fatal("Uncaught exception thrown!");
|
log::fatal("Uncaught exception thrown!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user