summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-11-06 00:29:51 +0000
committerPeter Powell <petpow@saberuk.com>2017-11-06 00:45:54 +0000
commit2bce37fc7dc10ad719cddd5094845e57c93ff095 (patch)
tree89ec34830582add4df1f313e867e2b3a9dbe666d /src
parenta2a071126726a40a877e10b024e2c2cccfd35512 (diff)
Fix an unhandled exception crash when rehashing modules.
Previously we used FOREACH_MOD to call OnRehash which handled any thrown exceptions. When we switched to ReadConfig this stopped being the case. This bug was introduced in c202dea024.
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 2a50a22b3..e242641f1 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -820,7 +820,17 @@ void ConfigReaderThread::Finish()
ConfigStatus status(user);
const ModuleManager::ModuleMap& mods = ServerInstance->Modules->GetModules();
for (ModuleManager::ModuleMap::const_iterator i = mods.begin(); i != mods.end(); ++i)
- i->second->ReadConfig(status);
+ {
+ try
+ {
+ ServerInstance->Logs->Log("MODULE", LOG_DEBUG, "Rehashing " + i->first);
+ i->second->ReadConfig(status);
+ }
+ catch (CoreException& modex)
+ {
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Exception caught: " + modex.GetReason());
+ }
+ }
// The description of this server may have changed - update it for WHOIS etc.
ServerInstance->FakeClient->server->description = Config->ServerDesc;