mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 10:01:15 +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
|
|
@ -47,11 +47,11 @@ String generate_core_api_project(const String &p_dir, const Vector<String> &p_fi
|
|||
Variant dir = p_dir;
|
||||
Variant compile_items = p_files;
|
||||
const Variant *args[2] = { &dir, &compile_items };
|
||||
MonoObject *ex = NULL;
|
||||
MonoObject *ret = klass->get_method("GenCoreApiProject", 2)->invoke(NULL, args, &ex);
|
||||
MonoException *exc = NULL;
|
||||
MonoObject *ret = klass->get_method("GenCoreApiProject", 2)->invoke(NULL, args, &exc);
|
||||
|
||||
if (ex) {
|
||||
mono_print_unhandled_exception(ex);
|
||||
if (exc) {
|
||||
GDMonoUtils::debug_unhandled_exception(exc);
|
||||
ERR_FAIL_V(String());
|
||||
}
|
||||
|
||||
|
|
@ -68,11 +68,11 @@ String generate_editor_api_project(const String &p_dir, const String &p_core_dll
|
|||
Variant core_dll_path = p_core_dll_path;
|
||||
Variant compile_items = p_files;
|
||||
const Variant *args[3] = { &dir, &core_dll_path, &compile_items };
|
||||
MonoObject *ex = NULL;
|
||||
MonoObject *ret = klass->get_method("GenEditorApiProject", 3)->invoke(NULL, args, &ex);
|
||||
MonoException *exc = NULL;
|
||||
MonoObject *ret = klass->get_method("GenEditorApiProject", 3)->invoke(NULL, args, &exc);
|
||||
|
||||
if (ex) {
|
||||
mono_print_unhandled_exception(ex);
|
||||
if (exc) {
|
||||
GDMonoUtils::debug_unhandled_exception(exc);
|
||||
ERR_FAIL_V(String());
|
||||
}
|
||||
|
||||
|
|
@ -89,11 +89,11 @@ String generate_game_project(const String &p_dir, const String &p_name, const Ve
|
|||
Variant name = p_name;
|
||||
Variant compile_items = p_files;
|
||||
const Variant *args[3] = { &dir, &name, &compile_items };
|
||||
MonoObject *ex = NULL;
|
||||
MonoObject *ret = klass->get_method("GenGameProject", 3)->invoke(NULL, args, &ex);
|
||||
MonoException *exc = NULL;
|
||||
MonoObject *ret = klass->get_method("GenGameProject", 3)->invoke(NULL, args, &exc);
|
||||
|
||||
if (ex) {
|
||||
mono_print_unhandled_exception(ex);
|
||||
if (exc) {
|
||||
GDMonoUtils::debug_unhandled_exception(exc);
|
||||
ERR_FAIL_V(String());
|
||||
}
|
||||
|
||||
|
|
@ -110,11 +110,11 @@ void add_item(const String &p_project_path, const String &p_item_type, const Str
|
|||
Variant item_type = p_item_type;
|
||||
Variant include = p_include;
|
||||
const Variant *args[3] = { &project_path, &item_type, &include };
|
||||
MonoObject *ex = NULL;
|
||||
klass->get_method("AddItemToProjectChecked", 3)->invoke(NULL, args, &ex);
|
||||
MonoException *exc = NULL;
|
||||
klass->get_method("AddItemToProjectChecked", 3)->invoke(NULL, 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