Fix empty lines being added for errors with no script backtrace
This commit is contained in:
parent
1cf573f44d
commit
31b90246e7
12 changed files with 37 additions and 11 deletions
|
|
@ -237,7 +237,9 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
|
|||
}
|
||||
if (!script_backtraces.is_empty()) {
|
||||
for (const Ref<ScriptBacktrace> &backtrace : script_backtraces) {
|
||||
print_error(backtrace->format());
|
||||
if (!backtrace->is_empty()) {
|
||||
print_error(backtrace->format());
|
||||
}
|
||||
}
|
||||
print_error("-- END OF SCRIPT BACKTRACE --");
|
||||
print_error("================================================================");
|
||||
|
|
|
|||
|
|
@ -191,7 +191,9 @@ extern void CrashHandlerException(int signal) {
|
|||
}
|
||||
if (!script_backtraces.is_empty()) {
|
||||
for (const Ref<ScriptBacktrace> &backtrace : script_backtraces) {
|
||||
print_error(backtrace->format());
|
||||
if (!backtrace->is_empty()) {
|
||||
print_error(backtrace->format());
|
||||
}
|
||||
}
|
||||
print_error("-- END OF SCRIPT BACKTRACE --");
|
||||
print_error("================================================================");
|
||||
|
|
|
|||
|
|
@ -143,7 +143,9 @@ void WindowsTerminalLogger::log_error(const char *p_function, const char *p_file
|
|||
}
|
||||
|
||||
for (const Ref<ScriptBacktrace> &backtrace : p_script_backtraces) {
|
||||
logf_error("%s\n", backtrace->format(strlen(indent)).utf8().get_data());
|
||||
if (!backtrace->is_empty()) {
|
||||
logf_error("%s\n", backtrace->format(strlen(indent)).utf8().get_data());
|
||||
}
|
||||
}
|
||||
|
||||
SetConsoleTextAttribute(hCon, sbi.wAttributes);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue