- Timestamp:
- May 5, 2008 2:01:49 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r8583 r8584 1154 1154 1155 1155 1156 /** @def AssertReleaseMsgBreak 1157 * Assert that an expression is true, print the message and hit a breakpoint and break if it isn't. 1158 * 1159 * @param expr Expression which should be true. 1160 * @param a printf argument list (in parenthesis). 1161 */ 1162 #define AssertReleaseMsgBreak(expr, a) \ 1163 if (RT_UNLIKELY(!(expr))) \ 1164 { \ 1165 AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \ 1166 AssertMsg2 a; \ 1167 AssertReleaseBreakpoint(); \ 1168 break; \ 1169 } else do {} while (0) 1170 1156 1171 /** @def AssertReleaseMsgBreakStmt 1157 1172 * Assert that an expression is true, print the message and hit a breakpoing and break if it isn't. … … 1170 1185 } else do {} while (0) 1171 1186 1172 /** @def AssertReleaseMsgBreakVoid1173 * Assert that an expression is true, print the message and hit a breakpoint and break if it isn't.1174 *1175 * @param expr Expression which should be true.1176 * @param a printf argument list (in parenthesis).1177 * @todo Rename to AssertReleaseMsgBreak.1178 */1179 #define AssertReleaseMsgBreakVoid(expr, a) \1180 if (RT_UNLIKELY(!(expr))) \1181 { \1182 AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \1183 AssertMsg2 a; \1184 AssertReleaseBreakpoint(); \1185 break; \1186 } else do {} while (0)1187 1188 1187 1189 1188 /** @def AssertReleaseFailed … … 1779 1778 * @todo Rename to AssertReleaseMsgRCBreak. 1780 1779 */ 1781 #define AssertReleaseMsgRCBreakVoid(rc, msg) AssertReleaseMsgBreak Void(RT_SUCCESS(rc), msg)1780 #define AssertReleaseMsgRCBreakVoid(rc, msg) AssertReleaseMsgBreak(RT_SUCCESS(rc), msg) 1782 1781 1783 1782 /** @def AssertReleaseRCSuccess … … 1836 1835 * @todo Rename to AssertReleaseRCSuccessBreak. 1837 1836 */ 1838 #define AssertReleaseRCSuccessBreakVoid(rc) AssertReleaseMsgBreak Void((rc) == VINF_SUCCESS, ("%Vra\n", (rc)))1837 #define AssertReleaseRCSuccessBreakVoid(rc) AssertReleaseMsgBreak((rc) == VINF_SUCCESS, ("%Vra\n", (rc))) 1839 1838 1840 1839
Note:
See TracChangeset
for help on using the changeset viewer.