diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-06-26 21:03:42 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-07-04 03:08:29 +0200 |
commit | 4739cb8c0003a7c35220ce43d8263df617c6fbe0 (patch) | |
tree | 257bd9f9e4951c0b90db9220fc3eeb1bf45b5f65 /modules/mono/editor/godotsharp_builds.cpp | |
parent | 68f7cf13c7326c077cc6ff8a6a267ae2610c4519 (diff) | |
download | redot-engine-4739cb8c0003a7c35220ce43d8263df617c6fbe0.tar.gz |
Mono: Pending exceptions and cleanup
Diffstat (limited to 'modules/mono/editor/godotsharp_builds.cpp')
-rw-r--r-- | modules/mono/editor/godotsharp_builds.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp index 43d58caad2..156a01ff5a 100644 --- a/modules/mono/editor/godotsharp_builds.cpp +++ b/modules/mono/editor/godotsharp_builds.cpp @@ -512,14 +512,14 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { const Variant *ctor_args[2] = { &solution, &config }; - MonoObject *ex = NULL; + MonoException *exc = NULL; GDMonoMethod *ctor = klass->get_method(".ctor", 2); - ctor->invoke(mono_object, ctor_args, &ex); + ctor->invoke(mono_object, ctor_args, &exc); - if (ex) { + if (exc) { exited = true; - GDMonoUtils::print_unhandled_exception(ex); - String message = "The build constructor threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex); + GDMonoUtils::debug_unhandled_exception(exc); + String message = "The build constructor threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(exc); build_tab->on_build_exec_failed(message); ERR_EXPLAIN(message); ERR_FAIL(); @@ -534,14 +534,14 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { const Variant *args[3] = { &logger_assembly, &logger_output_dir, &custom_props }; - ex = NULL; + exc = NULL; GDMonoMethod *build_method = klass->get_method(p_blocking ? "Build" : "BuildAsync", 3); - build_method->invoke(mono_object, args, &ex); + build_method->invoke(mono_object, args, &exc); - if (ex) { + if (exc) { exited = true; - GDMonoUtils::print_unhandled_exception(ex); - String message = "The build method threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex); + GDMonoUtils::debug_unhandled_exception(exc); + String message = "The build method threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(exc); build_tab->on_build_exec_failed(message); ERR_EXPLAIN(message); ERR_FAIL(); |