From f87ae395ee5dc35c44df2225d3c2ce605cae9099 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Thu, 25 Jun 2020 23:28:51 +0200 Subject: [PATCH] Mono/C#: Fix unhandled exception not being printed For some reason `mono_unhandled_exception` is not printing the exception as its comment claims. Use `mono_print_unhandled_exception` instead. --- modules/mono/mono_gd/gd_mono_internals.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp index 27e402d7770..abb2761909c 100644 --- a/modules/mono/mono_gd/gd_mono_internals.cpp +++ b/modules/mono/mono_gd/gd_mono_internals.cpp @@ -114,7 +114,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) { } void unhandled_exception(MonoException *p_exc) { - mono_unhandled_exception((MonoObject *)p_exc); // prints the exception as well + mono_print_unhandled_exception((MonoObject *)p_exc); if (GDMono::get_singleton()->get_unhandled_exception_policy() == GDMono::POLICY_TERMINATE_APP) { // Too bad 'mono_invoke_unhandled_exception_hook' is not exposed to embedders