1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Ability to print and log script backtraces

Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
This commit is contained in:
reduz
2025-03-31 21:39:43 +02:00
committed by Mikael Hermansson
parent f704113abe
commit d1dcb40d56
32 changed files with 813 additions and 95 deletions

View File

@@ -84,13 +84,13 @@ String OS::get_identifier() const {
return get_name().to_lower();
}
void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify, Logger::ErrorType p_type) {
void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify, Logger::ErrorType p_type, const Vector<Ref<ScriptBacktrace>> &p_script_backtraces) {
if (!_stderr_enabled) {
return;
}
if (_logger) {
_logger->log_error(p_function, p_file, p_line, p_code, p_rationale, p_editor_notify, p_type);
_logger->log_error(p_function, p_file, p_line, p_code, p_rationale, p_editor_notify, p_type, p_script_backtraces);
}
}