mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Don't throw any exceptions in CModules::LoadModule() on version mismatch
This also removes all the code catching those exceptions. There was nothing which justified these exceptions and removing them doesn't hurt. ByeBye CException::EX_BadModVersion git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1137 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+1
-6
@@ -734,7 +734,6 @@ bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* p
|
||||
if (CModule::GetCoreVersion() != Version()) {
|
||||
dlclose(p);
|
||||
sRetMsg = "Version mismatch, recompile this module.";
|
||||
throw CException(CException::EX_BadModVersion);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -886,11 +885,7 @@ bool CModules::ReloadModule(const CString& sModule, const CString& sArgs, CUser*
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!LoadModule(sMod, sArgs, pUser, sRetMsg)) {
|
||||
return false;
|
||||
}
|
||||
} catch(...) {
|
||||
if (!LoadModule(sMod, sArgs, pUser, sRetMsg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user