diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_language.cpp | 6 | ||||
-rw-r--r-- | modules/mono/csharp_script.cpp | 2 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_utils.cpp | 6 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_utils.h | 2 |
4 files changed, 10 insertions, 6 deletions
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp index 2751d73ca3..8101ebc6f3 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.cpp +++ b/modules/gdnative/pluginscript/pluginscript_language.cpp @@ -45,7 +45,11 @@ void PluginScriptLanguage::init() { } String PluginScriptLanguage::get_type() const { - return String(_desc.type); + // We should use _desc.type here, however the returned type is used to + // query ClassDB which would complain given the type is not registered + // from his point of view... + // To solve this we just use a more generic (but present in ClassDB) type. + return String("PluginScript"); } String PluginScriptLanguage::get_extension() const { diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 2d7583cc23..db2d0a9780 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -449,7 +449,7 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info() // Printing an error here will result in endless recursion, so we must be careful - if (!gdmono->is_runtime_initialized() && GDMono::get_singleton()->get_editor_tools_assembly()) + if (!gdmono->is_runtime_initialized() && GDMono::get_singleton()->get_api_assembly()) return Vector<StackInfo>(); MonoObject *stack_trace = mono_object_new(mono_domain_get(), CACHED_CLASS(System_Diagnostics_StackTrace)->get_mono_ptr()); diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index 4aa2c007c2..d02c73978e 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -399,7 +399,7 @@ void print_unhandled_exception(MonoObject *p_exc) { print_unhandled_exception(p_exc, false); } -void print_unhandled_exception(MonoObject *p_exc, bool p_fail_silently) { +void print_unhandled_exception(MonoObject *p_exc, bool p_recursion_caution) { mono_print_unhandled_exception(p_exc); #ifdef DEBUG_ENABLED GDMonoClass *st_klass = CACHED_CLASS(System_Diagnostics_StackTrace); @@ -414,7 +414,7 @@ void print_unhandled_exception(MonoObject *p_exc, bool p_fail_silently) { if (unexpected_exc != NULL) { mono_print_unhandled_exception(unexpected_exc); - if (p_fail_silently) { + if (p_recursion_caution) { // Called from CSharpLanguage::get_current_stack_info, // so printing an error here could result in endless recursion OS::get_singleton()->printerr("Mono: Method GDMonoUtils::print_unhandled_exception failed"); @@ -425,7 +425,7 @@ void print_unhandled_exception(MonoObject *p_exc, bool p_fail_silently) { } Vector<ScriptLanguage::StackInfo> si; - if (stack_trace != NULL) + if (stack_trace != NULL && !p_recursion_caution) si = CSharpLanguage::get_singleton()->stack_trace_get_info(stack_trace); String file = si.size() ? si[0].file : __FILE__; diff --git a/modules/mono/mono_gd/gd_mono_utils.h b/modules/mono/mono_gd/gd_mono_utils.h index 1acc547993..597397eced 100644 --- a/modules/mono/mono_gd/gd_mono_utils.h +++ b/modules/mono/mono_gd/gd_mono_utils.h @@ -177,7 +177,7 @@ MonoDomain *create_domain(const String &p_friendly_name); String get_exception_name_and_message(MonoObject *p_ex); void print_unhandled_exception(MonoObject *p_exc); -void print_unhandled_exception(MonoObject *p_exc, bool p_fail_silently); +void print_unhandled_exception(MonoObject *p_exc, bool p_recursion_caution); } // namespace GDMonoUtils |