Print file path when failing to load dynamic library

This commit is contained in:
Johan Aires Rastén
2026-02-10 10:48:45 +01:00
parent 56f3e2611d
commit 2acdfdbbbc
+1 -1
View File
@@ -1058,7 +1058,7 @@ Error OS_Unix::open_dynamic_library(const String &p_path, void *&p_library_handl
path = get_executable_path().get_base_dir().path_join("../lib").path_join(p_path.get_file());
}
ERR_FAIL_COND_V(!FileAccess::exists(path), ERR_FILE_NOT_FOUND);
ERR_FAIL_COND_V_MSG(!FileAccess::exists(path), ERR_FILE_NOT_FOUND, vformat("Can't open dynamic library, file not found: '%s'.", p_path));
p_library_handle = dlopen(path.utf8().get_data(), GODOT_DLOPEN_MODE);
ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror()));