Skip to content

Commit

Permalink
Mono/C#: Fix unhandled exception not being printed
Browse files Browse the repository at this point in the history
For some reason `mono_unhandled_exception` is not
printing the exception as its comment claims.
Use `mono_print_unhandled_exception` instead.

(cherry picked from commit f87ae39)
  • Loading branch information
neikeq authored and akien-mga committed Jun 26, 2020
1 parent c8586d3 commit c682410
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/mono/mono_gd/gd_mono_internals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,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
Expand Down

0 comments on commit c682410

Please sign in to comment.