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:
psychon
2008-07-17 12:01:44 +00:00
parent 27c1a76cf8
commit 10210e4619
6 changed files with 40 additions and 72 deletions
+5 -9
View File
@@ -619,16 +619,12 @@ bool CWebAdminSock::SettingsPage(CString& sPageRet) {
if (!sModName.empty()) {
CString sArgs = GetParam("modargs_" + sModName);
try {
if (!CZNC::Get().GetModules().FindModule(sModName)) {
if (!CZNC::Get().GetModules().LoadModule(sModName, sArgs, NULL, sModRet)) {
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sModRet << "]" << endl);
}
} else {
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] because it is already loaded" << endl);
if (!CZNC::Get().GetModules().FindModule(sModName)) {
if (!CZNC::Get().GetModules().LoadModule(sModName, sArgs, NULL, sModRet)) {
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sModRet << "]" << endl);
}
} catch(...) {
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sArgs << "]" << endl);
} else {
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] because it is already loaded" << endl);
}
}
}