Index: src/ch/ClipboardMonitor.cpp =================================================================== diff -u -r9ddf8fdd5f641491dd30c49eb90f8f740314b6af -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision 9ddf8fdd5f641491dd30c49eb90f8f740314b6af) +++ src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -40,7 +40,13 @@ CClipboardMonitor::~CClipboardMonitor() { - Stop(); + try + { + Stop(); + } + catch (const std::exception& e) + { + } } void CClipboardMonitor::StartMonitor(chengine::TTaskManagerPtr spTasks) Index: src/libchcore/TIpcMutex.cpp =================================================================== diff -u -rc1f7af79a52133c6d4b14944c3370288be7f5af5 -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/libchcore/TIpcMutex.cpp (.../TIpcMutex.cpp) (revision c1f7af79a52133c6d4b14944c3370288be7f5af5) +++ src/libchcore/TIpcMutex.cpp (.../TIpcMutex.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -35,7 +35,13 @@ TIpcMutex::~TIpcMutex() { - Close(); + try + { + Close(); + } + catch (const std::exception& e) + { + } } void TIpcMutex::CreateMutex(const wchar_t* pszName) Index: src/libchcore/TIpcMutexLock.cpp =================================================================== diff -u -rc1f7af79a52133c6d4b14944c3370288be7f5af5 -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/libchcore/TIpcMutexLock.cpp (.../TIpcMutexLock.cpp) (revision c1f7af79a52133c6d4b14944c3370288be7f5af5) +++ src/libchcore/TIpcMutexLock.cpp (.../TIpcMutexLock.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -32,6 +32,12 @@ TIpcMutexLock::~TIpcMutexLock() { - m_rMutex.Unlock(); + try + { + m_rMutex.Unlock(); + } + catch (const std::exception& e) + { + } } } Index: src/libchengine/TBasePathDataContainer.cpp =================================================================== diff -u -r85b07e753393f661f7d8f528e4238ebb6e9e1204 -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/libchengine/TBasePathDataContainer.cpp (.../TBasePathDataContainer.cpp) (revision 85b07e753393f661f7d8f528e4238ebb6e9e1204) +++ src/libchengine/TBasePathDataContainer.cpp (.../TBasePathDataContainer.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -36,8 +36,14 @@ TBasePathDataContainer::~TBasePathDataContainer() { - // clear works with critical section to avoid destruction while item in use - Clear(); + try + { + // clear works with critical section to avoid destruction while item in use + Clear(); + } + catch (const std::exception& e) + { + } } void TBasePathDataContainer::Store(const ISerializerContainerPtr& spContainer) const Index: src/libchengine/TLocalFilesystemFind.cpp =================================================================== diff -u -r9ddf8fdd5f641491dd30c49eb90f8f740314b6af -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/libchengine/TLocalFilesystemFind.cpp (.../TLocalFilesystemFind.cpp) (revision 9ddf8fdd5f641491dd30c49eb90f8f740314b6af) +++ src/libchengine/TLocalFilesystemFind.cpp (.../TLocalFilesystemFind.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -36,7 +36,13 @@ TLocalFilesystemFind::~TLocalFilesystemFind() { - InternalClose(); + try + { + InternalClose(); + } + catch (const std::exception& e) + { + } } bool TLocalFilesystemFind::FindNext(TFileInfoPtr& rspFileInfo) Index: src/libchengine/TOrderedBufferQueue.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/libchengine/TOrderedBufferQueue.cpp (.../TOrderedBufferQueue.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TOrderedBufferQueue.cpp (.../TOrderedBufferQueue.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -39,7 +39,13 @@ TOrderedBufferQueue::~TOrderedBufferQueue() { - ClearBuffers(); + try + { + ClearBuffers(); + } + catch (const std::exception& e) + { + } } void TOrderedBufferQueue::Push(TOverlappedDataBuffer* pBuffer) Index: src/libchengine/TSizeFormatter.cpp =================================================================== diff -u -r5b53476be2173282f99dd5d72207de90317bacad -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/libchengine/TSizeFormatter.cpp (.../TSizeFormatter.cpp) (revision 5b53476be2173282f99dd5d72207de90317bacad) +++ src/libchengine/TSizeFormatter.cpp (.../TSizeFormatter.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -68,15 +68,15 @@ wchar_t szData[ stMaxSize ] = { 0 }; if(ullData >= 1288490188800 && (!bStrict || (ullData % 1099511627776) == 0)) - _sntprintf_s(szData, stMaxSize, L"%.2f %s", (double)(ullData / 1099511627776.0), m_strTBytes.c_str()); + _sntprintf_s(szData, stMaxSize, _TRUNCATE, L"%.2f %s", (double)(ullData / 1099511627776.0), m_strTBytes.c_str()); else if(ullData >= 1258291200 && (!bStrict || (ullData % 1073741824) == 0)) - _sntprintf_s(szData, stMaxSize, L"%.2f %s", (double)(ullData / 1073741824.0), m_strGBytes.c_str()); + _sntprintf_s(szData, stMaxSize, _TRUNCATE, L"%.2f %s", (double)(ullData / 1073741824.0), m_strGBytes.c_str()); else if(ullData >= 1228800 && (!bStrict || (ullData % 1048576) == 0)) - _sntprintf_s(szData, stMaxSize, _T("%.2f %s"), (double)(ullData / 1048576.0), m_strMBytes.c_str()); + _sntprintf_s(szData, stMaxSize, _TRUNCATE, _T("%.2f %s"), (double)(ullData / 1048576.0), m_strMBytes.c_str()); else if(ullData >= 1200 && (!bStrict || (ullData % 1024) == 0)) - _sntprintf_s(szData, stMaxSize, _T("%.2f %s"), (double)(ullData / 1024.0), m_strKBytes.c_str()); + _sntprintf_s(szData, stMaxSize, _TRUNCATE, _T("%.2f %s"), (double)(ullData / 1024.0), m_strKBytes.c_str()); else - _sntprintf_s(szData, stMaxSize, _T("%I64u %s"), ullData, m_strBytes.c_str()); + _sntprintf_s(szData, stMaxSize, _TRUNCATE, _T("%I64u %s"), ullData, m_strBytes.c_str()); return szData; } Index: src/libchengine/TTask.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/libchengine/TTask.cpp (.../TTask.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TTask.cpp (.../TTask.cpp) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -83,7 +83,13 @@ TTask::~TTask() { - KillThread(); + try + { + KillThread(); + } + catch (const std::exception& e) + { + } } void TTask::SetTaskDefinition(const TTaskDefinition& rTaskDefinition) Index: src/liblogger/TLogRecord.h =================================================================== diff -u -r60a4fdd460c76ecb5ccf03802ca5d0b679d23d51 -r575ff9e217ec1d9d5c95a31bc59d2a73a22d1383 --- src/liblogger/TLogRecord.h (.../TLogRecord.h) (revision 60a4fdd460c76ecb5ccf03802ca5d0b679d23d51) +++ src/liblogger/TLogRecord.h (.../TLogRecord.h) (revision 575ff9e217ec1d9d5c95a31bc59d2a73a22d1383) @@ -66,8 +66,14 @@ inline TLogRecord::~TLogRecord() { - *this << L"\r\n"; - m_spFileData->PushLogEntry(str().c_str()); + try + { + *this << L"\r\n"; + m_spFileData->PushLogEntry(str().c_str()); + } + catch (const std::exception& e) + { + } } inline bool TLogRecord::IsEnabled() const