Comparison

core/modulemanager.lua @ 4662:105423f77d46

modulemanager: Report errors that happen when loading a shared module onto its original host
author Matthew Wild <mwild1@gmail.com>
date Mon, 23 Apr 2012 14:11:10 +0100
parent 4652:9d24bc503621
child 4665:6be91ca54613
comparison
equal deleted inserted replaced
4661:76db5d0a2104 4662:105423f77d46
184 log("warn", "mod_%s: Setting module.host = '*' deprecated, call module:set_global() instead", module_name); 184 log("warn", "mod_%s: Setting module.host = '*' deprecated, call module:set_global() instead", module_name);
185 api_instance:set_global(); 185 api_instance:set_global();
186 end 186 end
187 if host ~= api_instance.host and module_has_method(pluginenv, "add_host") then 187 if host ~= api_instance.host and module_has_method(pluginenv, "add_host") then
188 -- Now load the module again onto the host it was originally being loaded on 188 -- Now load the module again onto the host it was originally being loaded on
189 do_load_module(host, module_name); 189 ok, err = do_load_module(host, module_name);
190 end 190 end
191 end 191 end
192 end 192 end
193 if not ok then 193 if not ok then
194 log("error", "Error initializing module '%s' on '%s': %s", module_name, host, err or "nil"); 194 log("error", "Error initializing module '%s' on '%s': %s", module_name, host, err or "nil");