Index: src/libchcore/TCoreException.cpp =================================================================== diff -u -N -re96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3 -r0c48142d3db406c32c05d7afdf77da45b2459b34 --- src/libchcore/TCoreException.cpp (.../TCoreException.cpp) (revision e96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3) +++ src/libchcore/TCoreException.cpp (.../TCoreException.cpp) (revision 0c48142d3db406c32c05d7afdf77da45b2459b34) @@ -18,75 +18,7 @@ ***************************************************************************/ #include "stdafx.h" #include "TCoreException.h" -#include namespace chcore { - // ============================================================================ - /// TCoreException::TCoreException - /// @date 2009/11/30 - /// - /// @brief Constructs core exception object with additional data. - /// @param[in] eErrorCode - error code - /// @param[in] pszFile - source file name - /// @param[in] stLineNumber - source line number - /// @param[in] pszFunction - function name in which the problem occured. - // ============================================================================ - TCoreException::TCoreException(EGeneralErrors eErrorCode, const tchar_t* pszFile, size_t stLineNumber, const tchar_t* pszFunction) : - TBaseException(eErrorCode, _T(""), pszFile, stLineNumber, pszFunction) - { - } - - // ============================================================================ - /// TCoreException::TCoreException - /// @date 2009/11/30 - /// - /// @brief Constructs core exception object with additional data. - /// @param[in] eErrorCode - error code - /// @param[in] stdException - standard exception info - /// @param[in] pszFile - source file name - /// @param[in] stLineNumber - source line number - /// @param[in] pszFunction - function name in which the problem occured. - // ============================================================================ - TCoreException::TCoreException(EGeneralErrors eErrorCode, std::exception& stdException, const tchar_t* pszFile, size_t stLineNumber, const tchar_t* pszFunction) : - TBaseException(eErrorCode, stdException.what(), pszFile, stLineNumber, pszFunction) - { - } - - // ============================================================================ - /// TCoreWin32Exception::TCoreWin32Exception - /// @date 2011/07/18 - /// - /// @brief Constructs core win32 exception. - /// @param[in] eErrorCode - core error code - /// @param[in] dwWin32Exception - win32 error code - /// @param[in] pszFile -source file where the exception was thrown - /// @param[in] stLineNumber - source code line number where the exception was thrown - /// @param[in] pszFunction - function throwing the exception - // ============================================================================ - TCoreWin32Exception::TCoreWin32Exception(EGeneralErrors eErrorCode, DWORD dwWin32Exception, const tchar_t* pszFile, size_t stLineNumber, const tchar_t* pszFunction) : - TBaseException(eErrorCode, _T(""), pszFile, stLineNumber, pszFunction), - m_dwWin32ErrorCode(dwWin32Exception) - { - } - - // ============================================================================ - /// TCoreWin32Exception::GetErrorInfo - /// @date 2011/07/18 - /// - /// @brief Retrieves formatted exception information. - /// @param[in] pszBuffer - buffer for formatted string - /// @param[in] stMaxBuffer - max size of buffer - // ============================================================================ - void TCoreWin32Exception::GetErrorInfo(wchar_t* pszBuffer, size_t stMaxBuffer) const - { - _snwprintf_s(pszBuffer, stMaxBuffer, _TRUNCATE, _T("Error code: %ld (win32 error code: %lu)"), m_eErrorCode, m_dwWin32ErrorCode); - pszBuffer[stMaxBuffer - 1] = _T('\0'); - } - - void TCoreWin32Exception::GetDetailedErrorInfo(wchar_t* pszBuffer, size_t stMaxBuffer) const - { - _snwprintf_s(pszBuffer, stMaxBuffer, _TRUNCATE, _T("Error code: %ld\r\nWin32 error code: %lu\r\nFile: %s\r\nFunction: %s\r\nLine no: %lu"), m_eErrorCode, m_dwWin32ErrorCode, m_pszFile, m_pszFunction, (unsigned long)m_stLineNumber); - pszBuffer[stMaxBuffer - 1] = _T('\0'); - } }