diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-27 10:32:38 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-27 10:32:38 +0100 |
commit | bd1df0f2e3473710aed9dbc48268fc15db7deac7 (patch) | |
tree | c8fc09adfb7788f44459378c8f4f6ea57cc02065 /modules/mono | |
parent | 22e15750216e7c09e0181f737b48964a827dfd20 (diff) | |
parent | c93eec4139a460ed8ef0a1bcf9450d901ba04f7a (diff) |
Merge pull request #71943 from paulloz/debugger/better-errors-printing
Better error display in debugger panel
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs | 2 | ||||
-rw-r--r-- | modules/mono/glue/runtime_interop.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs index 5a0ea2ba13..71a2adadcb 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs @@ -68,7 +68,7 @@ namespace Godot.NativeInterop string file = globalFrames.Count > 0 ? globalFrames[0].File ?? "" : ""; string func = globalFrames.Count > 0 ? globalFrames[0].Func : ""; int line = globalFrames.Count > 0 ? globalFrames[0].Line : 0; - string errorMsg = "Exception"; + string errorMsg = e.GetType().FullName ?? ""; using godot_string nFile = Marshaling.ConvertStringToNative(file); using godot_string nFunc = Marshaling.ConvertStringToNative(func); diff --git a/modules/mono/glue/runtime_interop.cpp b/modules/mono/glue/runtime_interop.cpp index 55e09f0501..e7f50d2caa 100644 --- a/modules/mono/glue/runtime_interop.cpp +++ b/modules/mono/glue/runtime_interop.cpp @@ -31,6 +31,7 @@ #include "runtime_interop.h" #include "core/config/engine.h" +#include "core/config/project_settings.h" #include "core/debugger/engine_debugger.h" #include "core/debugger/script_debugger.h" #include "core/io/marshalls.h" @@ -45,6 +46,7 @@ #include "modules/mono/managed_callable.h" #include "modules/mono/mono_gd/gd_mono_cache.h" #include "modules/mono/signal_awaiter_utils.h" +#include "modules/mono/utils/path_utils.h" #ifdef __cplusplus extern "C" { @@ -84,7 +86,8 @@ void godotsharp_stack_info_vector_destroy( void godotsharp_internal_script_debugger_send_error(const String *p_func, const String *p_file, int32_t p_line, const String *p_err, const String *p_descr, bool p_warning, const Vector<ScriptLanguage::StackInfo> *p_stack_info_vector) { - EngineDebugger::get_script_debugger()->send_error(*p_func, *p_file, p_line, *p_err, *p_descr, + const String file = ProjectSettings::get_singleton()->localize_path(p_file->simplify_path()); + EngineDebugger::get_script_debugger()->send_error(*p_func, file, p_line, *p_err, *p_descr, true, p_warning ? ERR_HANDLER_WARNING : ERR_HANDLER_ERROR, *p_stack_info_vector); } |