diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-19 12:25:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-19 12:25:01 +0200 |
commit | 7496b62c345b645e556a26e436b9183f1f2b5130 (patch) | |
tree | bbcb649a00b5ba80188d896019017a4df476b9d7 | |
parent | 01efb938424c7678f5a834e25244d4ed741c563a (diff) | |
parent | d2dba74bae69564b7bb787c44bf42abe43b6e523 (diff) |
Merge pull request #62207 from Bromeon/feature/gdextension-loading-errors
-rw-r--r-- | core/extension/native_extension.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index ac9d2ca8a6..ebdfa20725 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -281,6 +281,7 @@ void NativeExtension::_get_library_path(const GDNativeExtensionClassLibraryPtr p Error NativeExtension::open_library(const String &p_path, const String &p_entry_symbol) { Error err = OS::get_singleton()->open_dynamic_library(p_path, library, true, &library_path); if (err != OK) { + ERR_PRINT("GDExtension dynamic library not found: " + p_path); return err; } @@ -289,6 +290,7 @@ Error NativeExtension::open_library(const String &p_path, const String &p_entry_ err = OS::get_singleton()->get_dynamic_library_symbol_handle(library, p_entry_symbol, entry_funcptr, false); if (err != OK) { + ERR_PRINT("GDExtension entry point '" + p_entry_symbol + "' not found in library " + p_path); OS::get_singleton()->close_dynamic_library(library); return err; } @@ -299,6 +301,7 @@ Error NativeExtension::open_library(const String &p_path, const String &p_entry_ level_initialized = -1; return OK; } else { + ERR_PRINT("GDExtension initialization function '" + p_entry_symbol + "' returned an error."); return FAILED; } } @@ -387,6 +390,7 @@ Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const St } if (err != OK) { + ERR_PRINT("Error loading GDExtension config file: " + p_path); return Ref<Resource>(); } @@ -394,6 +398,7 @@ Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const St if (r_error) { *r_error = ERR_INVALID_DATA; } + ERR_PRINT("GDExtension config file must contain 'configuration.entry_symbol' key: " + p_path); return Ref<Resource>(); } @@ -426,6 +431,7 @@ Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const St if (r_error) { *r_error = ERR_FILE_NOT_FOUND; } + ERR_PRINT("No GDExtension library found for current architecture; in config file " + p_path); return Ref<Resource>(); } @@ -443,6 +449,7 @@ Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const St } if (err != OK) { + // Errors already logged in open_library() return Ref<Resource>(); } |