1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Mono: Pending exceptions and cleanup

This commit is contained in:
Ignacio Etcheverry
2018-06-26 21:03:42 +02:00
parent 68f7cf13c7
commit 4739cb8c00
23 changed files with 720 additions and 193 deletions

View File

@@ -40,14 +40,14 @@ void MonoDevelopInstance::execute(const Vector<String> &p_files) {
ERR_FAIL_NULL(execute_method);
ERR_FAIL_COND(gc_handle.is_null());
MonoObject *ex = NULL;
MonoException *exc = NULL;
Variant files = p_files;
const Variant *args[1] = { &files };
execute_method->invoke(gc_handle->get_target(), args, &ex);
execute_method->invoke(gc_handle->get_target(), args, &exc);
if (ex) {
mono_print_unhandled_exception(ex);
if (exc) {
GDMonoUtils::debug_unhandled_exception(exc);
ERR_FAIL();
}
}
@@ -68,14 +68,14 @@ MonoDevelopInstance::MonoDevelopInstance(const String &p_solution) {
MonoObject *obj = mono_object_new(TOOLS_DOMAIN, klass->get_mono_ptr());
GDMonoMethod *ctor = klass->get_method(".ctor", 1);
MonoObject *ex = NULL;
MonoException *exc = NULL;
Variant solution = p_solution;
const Variant *args[1] = { &solution };
ctor->invoke(obj, args, &ex);
ctor->invoke(obj, args, &exc);
if (ex) {
mono_print_unhandled_exception(ex);
if (exc) {
GDMonoUtils::debug_unhandled_exception(exc);
ERR_FAIL();
}