Changeset 606 for trunk/Utilities
- Timestamp:
- Mar 30, 2016, 7:36:19 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Miscellaneous/AtlReleaseTrace/roatlreleasetrace.h
r421 r606 8 8 #pragma once 9 9 10 #include <math.h> 10 11 #include <atlstr.h> 12 13 using namespace ATL; 11 14 12 15 //////////////////////////////////////////////////////////// … … 210 213 // ATLASSERT, ATLVERIFY 211 214 215 __forceinline VOID AtlAssert(BOOL bResult, LPCSTR pszFile, INT nLine, LPCSTR pszFunction, LPCSTR pszExpression) 216 { 217 if(bResult) 218 return; 219 _ATLTRY 220 { 221 _Z1(atlTraceException, 1, _T("Assertion failed: %hs\n") _T("%hs(%d): Assertion failed in function %hs\n"), pszExpression, pszFile, nLine, pszFunction); 222 AtlThrow(E_FAIL); 223 } 224 _ATLCATCHALL() 225 { 226 } 227 } 228 212 229 #undef ATLASSERT 213 230 #undef ATLVERIFY 214 #define ATLASSERT(x) { const BOOL bAssertValue = (x) != 0; if(!bAssertValue) { _ATLTRY { _Z1(atlTraceException, 1, _T("Assertion failed: %hs\n"), #x); AtlThrow(E_FAIL); } _ATLCATCHALL() { } } }231 #define ATLASSERT(x) AtlAssert((x) != 0, __FILE__, __LINE__, __FUNCTION__, #x); 215 232 #define ATLVERIFY(x) ATLASSERT(x) 216 233 217 234 #define _A ATLASSERT 218 235 #define _W ATLVERIFY 236 237 #undef _ASSERT 238 #define _ASSERT ATLASSERT 219 239 220 240 //////////////////////////////////////////////////////////// … … 275 295 }; 276 296 297 #undef _Y1 298 #undef _Y2 277 299 #define _Y1 CDebugTraceContext DebugTraceContext(__FILE__, __LINE__, __FUNCTION__); DebugTraceContext 278 300 #define _Y2 DebugTraceContext.Terminate
Note: See TracChangeset
for help on using the changeset viewer.