mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
Mono: Pending exceptions and cleanup
(cherry picked from commit 4739cb8c00)
This commit is contained in:
parent
291be24742
commit
e1cf8dc2cb
23 changed files with 738 additions and 171 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue