summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-12-18 15:40:58 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-12-18 15:40:58 +0300
commit0e854af70f6f330e63aa36fde125fbb0ca4ff8ef (patch)
treed681b5e06a8c572c13d82d0b49b54860fb896843 /plugins/Clist_nicer
parentd60f86e09f10ab4d55b94c6193b3bb3d3ca46b18 (diff)
C++ exceptions are disabled in all cases where they just prevent warnings
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/clist_nicer.vcxproj5
-rw-r--r--plugins/Clist_nicer/src/config.cpp35
-rw-r--r--plugins/Clist_nicer/src/stdafx.h1
3 files changed, 19 insertions, 22 deletions
diff --git a/plugins/Clist_nicer/clist_nicer.vcxproj b/plugins/Clist_nicer/clist_nicer.vcxproj
index 530b4c9922..5ce4a6fb8b 100644
--- a/plugins/Clist_nicer/clist_nicer.vcxproj
+++ b/plugins/Clist_nicer/clist_nicer.vcxproj
@@ -25,9 +25,4 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
</ImportGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <ExceptionHandling>Sync</ExceptionHandling>
- </ClCompile>
- </ItemDefinitionGroup>
</Project> \ No newline at end of file
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp
index 5a78cdb154..39d230a500 100644
--- a/plugins/Clist_nicer/src/config.cpp
+++ b/plugins/Clist_nicer/src/config.cpp
@@ -233,26 +233,27 @@ HMODULE Utils::loadSystemLibrary(const wchar_t* szFilename, bool useGetHandle)
wchar_t sysPathName[MAX_PATH + 2];
HMODULE _h = nullptr;
- try {
- if (0 == ::GetSystemDirectory(sysPathName, MAX_PATH))
- throw(CRTException("Error while loading system library", szFilename));
-
- sysPathName[MAX_PATH - 1] = 0;
- if (mir_wstrlen(sysPathName) + mir_wstrlen(szFilename) >= MAX_PATH)
- throw(CRTException("Error while loading system library", szFilename));
-
- mir_wstrcat(sysPathName, szFilename);
- if (useGetHandle)
- _h = ::GetModuleHandle(sysPathName);
- else
- _h = LoadLibrary(sysPathName);
- if (nullptr == _h)
- throw(CRTException("Error while loading system library", szFilename));
+ if (0 == ::GetSystemDirectory(sysPathName, MAX_PATH)) {
+ CRTException("Error while loading system library", szFilename).display();
+ return nullptr;
}
- catch (CRTException& ex) {
- ex.display();
+
+ sysPathName[MAX_PATH - 1] = 0;
+ if (mir_wstrlen(sysPathName) + mir_wstrlen(szFilename) >= MAX_PATH) {
+ CRTException("Error while loading system library", szFilename).display();
+ return nullptr;
+ }
+
+ mir_wstrcat(sysPathName, szFilename);
+ if (useGetHandle)
+ _h = ::GetModuleHandle(sysPathName);
+ else
+ _h = LoadLibrary(sysPathName);
+ if (nullptr == _h) {
+ CRTException("Error while loading system library", szFilename).display();
return nullptr;
}
+
return (_h);
}
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h
index bab2bf55c3..5053044be6 100644
--- a/plugins/Clist_nicer/src/stdafx.h
+++ b/plugins/Clist_nicer/src/stdafx.h
@@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shlwapi.h>
#include <Richedit.h>
+#include <malloc.h>
#include <uxtheme.h>
#include <vssym32.h>
#include <time.h>