Skip to content

Commit

Permalink
Show crash in html5 build as one message (#8303)
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Dec 10, 2023
1 parent 0d9c124 commit 8e7cc9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion engine/crash/src/backtrace_jsweb.cpp
Expand Up @@ -16,6 +16,7 @@
#include "crash_private.h"
#include <dlib/log.h>
#include <dlib/math.h>
#include <dlib/dlib.h>

#include <stdio.h>
#include <ctype.h>
Expand Down Expand Up @@ -73,5 +74,9 @@ extern "C" void JSWriteDump(char* json_stacktrace) {
}
dmCrash::WriteCrash(dmCrash::g_FilePath, &dmCrash::g_AppState);

dmCrash::LogCallstack(dmCrash::g_AppState.m_Extra);
// It's more convenient to get message as one error for web, so we don't use dmCrash::LogCallstack()
bool is_debug_mode = dLib::IsDebugMode();
dLib::SetDebugMode(true);
dmLogError("CALL STACK:\n%s\nCALL STACK END", dmCrash::g_AppState.m_Extra);
dLib::SetDebugMode(is_debug_mode);
}

0 comments on commit 8e7cc9d

Please sign in to comment.