mirror of
https://github.com/edubart/otclient.git
synced 2025-12-18 14:47:11 +01:00
add clock, change exceptions, add network exceptions, fix some crashes
This commit is contained in:
@@ -56,13 +56,13 @@ bool ModuleManager::discoverModule(const std::string& file)
|
||||
|
||||
std::string name = moduleNode->valueAt("name");
|
||||
if(getModule(name))
|
||||
throw OTMLException(moduleNode, "a module with the same name is already discovered, did you duplicate module names?");
|
||||
Fw::throwException("module '", name, "' already exists, cannot have duplicate module names");
|
||||
|
||||
module = ModulePtr(new Module(name));
|
||||
module->discover(moduleNode);
|
||||
m_modules.push_back(module);
|
||||
} catch(std::exception& e) {
|
||||
logError("failed to load module from '", file, "': ", e.what());
|
||||
} catch(Exception& e) {
|
||||
logError("Unable to discover module from file '", file, "': ", e.what());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user