diff options
| author | Ignacio Etcheverry | 2018-01-09 22:27:55 +0100 |
|---|---|---|
| committer | Ignacio Etcheverry | 2018-01-09 22:27:55 +0100 |
| commit | f7de51b3a6bc191cd0d79c1079889fb7a104b504 (patch) | |
| tree | b0254a2fa8fc399a02a81d729b1a90c99d10ca05 /modules/mono/mono_gd/gd_mono_utils.cpp | |
| parent | c037f6339f1fc9636b4fc9056ae0b2e2b673024d (diff) | |
| download | godot-f7de51b3a6bc191cd0d79c1079889fb7a104b504.tar.gz godot-f7de51b3a6bc191cd0d79c1079889fb7a104b504.tar.zst godot-f7de51b3a6bc191cd0d79c1079889fb7a104b504.zip | |
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_utils.cpp')
| -rw-r--r-- | modules/mono/mono_gd/gd_mono_utils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index 4aa2c007c..d02c73978 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -399,7 +399,7 @@ void print_unhandled_exception(MonoObject *p_exc) { print_unhandled_exception(p_exc, false); } -void print_unhandled_exception(MonoObject *p_exc, bool p_fail_silently) { +void print_unhandled_exception(MonoObject *p_exc, bool p_recursion_caution) { mono_print_unhandled_exception(p_exc); #ifdef DEBUG_ENABLED GDMonoClass *st_klass = CACHED_CLASS(System_Diagnostics_StackTrace); @@ -414,7 +414,7 @@ void print_unhandled_exception(MonoObject *p_exc, bool p_fail_silently) { if (unexpected_exc != NULL) { mono_print_unhandled_exception(unexpected_exc); - if (p_fail_silently) { + if (p_recursion_caution) { // Called from CSharpLanguage::get_current_stack_info, // so printing an error here could result in endless recursion OS::get_singleton()->printerr("Mono: Method GDMonoUtils::print_unhandled_exception failed"); @@ -425,7 +425,7 @@ void print_unhandled_exception(MonoObject *p_exc, bool p_fail_silently) { } Vector<ScriptLanguage::StackInfo> si; - if (stack_trace != NULL) + if (stack_trace != NULL && !p_recursion_caution) si = CSharpLanguage::get_singleton()->stack_trace_get_info(stack_trace); String file = si.size() ? si[0].file : __FILE__; |
