Changeset 25145 in vbox for trunk/src/VBox/Main
- Timestamp:
- Dec 2, 2009 12:39:15 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55553
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/VirtualBoxBase.h
r24989 r25145 200 200 #endif 201 201 202 203 /**204 * Special version of the AssertFailed macro to be used within VirtualBoxBase205 * subclasses that also inherit the VirtualBoxSupportErrorInfoImpl template.206 *207 * See ComAssert for more info.208 */209 #if defined (DEBUG)210 #define ComAssertFailed() AssertFailed()211 #else212 #define ComAssertFailed() \213 do { \214 setError(E_FAIL, "Assertion failed at '%s' (%d) in %s.\n" \215 "Please contact the product vendor!", \216 __FILE__, __LINE__, __PRETTY_FUNCTION__); \217 } while (0)218 #endif219 220 /**221 * Special version of the AssertMsgFailed macro to be used within VirtualBoxBase222 * subclasses that also inherit the VirtualBoxSupportErrorInfoImpl template.223 *224 * See ComAssert for more info.225 *226 * @param a printf argument list (in parenthesis).227 */228 #if defined (DEBUG)229 #define ComAssertMsgFailed(a) AssertMsgFailed(a)230 #else231 #define ComAssertMsgFailed(a) \232 do { \233 setError(E_FAIL, "Assertion failed at '%s' (%d) in %s.\n" \234 "%s.\n" \235 "Please contact the product vendor!", \236 __FILE__, __LINE__, __PRETTY_FUNCTION__, Utf8StrFmt a .raw()); \237 } while (0)238 #endif239 240 /**241 * Special version of the ComAssertMsgFailed macro that additionally takes242 * line number, file and function arguments to inject an assertion position243 * that differs from the position where this macro is instantiated.244 *245 * @param a printf argument list (in parenthesis).246 * @param file, line, func Line number (int), file and function (const char *).247 */248 #if defined (DEBUG)249 #define ComAssertMsgFailedPos(a, file, line, func) \250 do { \251 AssertMsg1((const char *)0, line, file, func); \252 AssertMsg2 a; \253 AssertBreakpoint(); \254 } while (0)255 #else256 #define ComAssertMsgFailedPos(a, file, line, func) \257 do { \258 setError(E_FAIL, \259 "Assertion failed at '%s' (%d) in %s.\n" \260 "%s.\n" \261 "Please contact the product vendor!", \262 file, line, func, Utf8StrFmt a .raw()); \263 } while (0)264 #endif265 266 202 /** 267 203 * Special version of the AssertComRC macro to be used within VirtualBoxBase
Note:
See TracChangeset
for help on using the changeset viewer.