|
@@ -92,15 +92,7 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
|
|
// Main error printing function.
|
|
// Main error printing function.
|
|
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, const char *p_message, bool p_editor_notify, ErrorHandlerType p_type) {
|
|
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, const char *p_message, bool p_editor_notify, ErrorHandlerType p_type) {
|
|
if (OS::get_singleton()) {
|
|
if (OS::get_singleton()) {
|
|
- Vector<Ref<ScriptBacktrace>> script_backtraces;
|
|
|
|
-
|
|
|
|
- // If script languages aren't initialized, we could be in the process of shutting down, in which case we don't want to allocate any objects, as we could be
|
|
|
|
- // logging ObjectDB leaks, where ObjectDB would be locked, thus causing a deadlock.
|
|
|
|
- if (ScriptServer::are_languages_initialized()) {
|
|
|
|
- script_backtraces = ScriptServer::capture_script_backtraces(false);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, p_message, p_editor_notify, (Logger::ErrorType)p_type, script_backtraces);
|
|
|
|
|
|
+ OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, p_message, p_editor_notify, (Logger::ErrorType)p_type, ScriptServer::capture_script_backtraces(false));
|
|
} else {
|
|
} else {
|
|
// Fallback if errors happen before OS init or after it's destroyed.
|
|
// Fallback if errors happen before OS init or after it's destroyed.
|
|
const char *err_details = (p_message && *p_message) ? p_message : p_error;
|
|
const char *err_details = (p_message && *p_message) ? p_message : p_error;
|