Changeset 8687 in vbox for trunk/include/VBox
- Timestamp:
- May 7, 2008 9:42:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/assert.h
r8309 r8687 41 41 */ 42 42 #define AssertComRC(rc) \ 43 do { AssertMsg (SUCCEEDED (rc), ("COM RC = 0x%08X\n", rc)); NOREF (rc); } while (0)43 do { AssertMsg (SUCCEEDED (rc), ("COM RC = %Rhrc (0x%08X)\n", rc, rc)); NOREF (rc); } while (0) 44 44 45 45 /** … … 51 51 */ 52 52 #define AssertComRCReturn(rc, ret) \ 53 AssertMsgReturn (SUCCEEDED (rc), ("COM RC = 0x%08X\n", rc), ret)53 AssertMsgReturn (SUCCEEDED (rc), ("COM RC = %Rhrc (0x%08X)\n", rc, rc), ret) 54 54 55 55 /** … … 61 61 */ 62 62 #define AssertComRCReturnRC(rc) \ 63 AssertMsgReturn (SUCCEEDED (rc), ("COM RC = 0x%08X\n", rc), rc)63 AssertMsgReturn (SUCCEEDED (rc), ("COM RC = %Rhrc (0x%08X)\n", rc, rc), rc) 64 64 65 65 /** … … 70 70 */ 71 71 #define AssertComRCReturnVoid(rc) \ 72 AssertMsgReturnVoid (SUCCEEDED (rc), ("COM RC = 0x%08X\n", rc))72 AssertMsgReturnVoid (SUCCEEDED (rc), ("COM RC = %Rhrc (0x%08X)\n", rc, rc)) 73 73 74 74 /** … … 80 80 */ 81 81 #define AssertComRCBreak(rc, eval) \ 82 if ( 1) { AssertComRC (rc); if (!SUCCEEDED (rc)) { eval; break; }} else do {} while (0)82 if (!SUCCEEDED (rc)) { AssertComRC (rc); eval; break; } else do {} while (0) 83 83 84 84 /** … … 87 87 * 88 88 * @param rc COM result code 89 * @param eval the expression to evaluate89 * @param eval the expression to throw 90 90 */ 91 91 #define AssertComRCThrow(rc, eval) \ 92 if ( 1) { AssertComRC (rc); if (!SUCCEEDED (rc)) { throw (eval); }} else do {} while (0)92 if (!SUCCEEDED (rc)) { AssertComRC (rc); throw (eval); } else do {} while (0) 93 93 94 94 /** … … 99 99 */ 100 100 #define AssertComRCBreakRC(rc) \ 101 if ( 1) { AssertComRC (rc); if (!SUCCEEDED (rc)) { break; }} else do {} while (0)101 if (!SUCCEEDED (rc)) { AssertComRC (rc); break; } else do {} while (0) 102 102 103 103 /** … … 108 108 */ 109 109 #define AssertComRCThrowRC(rc) \ 110 if ( 1) { AssertComRC (rc); if (!SUCCEEDED (rc)) { throw rc; }} else do {} while (0)110 if (!SUCCEEDED (rc)) { AssertComRC (rc); throw rc; } else do {} while (0) 111 111 112 112 /** … … 117 117 */ 118 118 #define CheckComRCReturnRC(rc) \ 119 if ( 1) { if (!SUCCEEDED (rc))return (rc); } else do {} while (0)119 if (!SUCCEEDED (rc)) { return (rc); } else do {} while (0) 120 120 121 121 /** … … 126 126 */ 127 127 #define CheckComRCBreakRC(rc) \ 128 if ( 1) { if (!SUCCEEDED (rc)) { break; }} else do {} while (0)128 if (!SUCCEEDED (rc)) { break; } else do {} while (0) 129 129 130 130 /** … … 135 135 */ 136 136 #define CheckComRCThrowRC(rc) \ 137 if ( 1) { if (!SUCCEEDED (rc)) { throw rc; }} else do {} while (0)137 if (!SUCCEEDED (rc)) { throw rc; } else do {} while (0) 138 138 139 139 /* … … 147 147 #define PRINT_RC_MESSAGE(rc) \ 148 148 do { \ 149 RTPrintf ("[!] Primary RC = %R wa\n", rc); \150 Log (("[!] Primary RC = %R wa\n", rc)); \149 RTPrintf ("[!] Primary RC = %Rhra\n", rc); \ 150 Log (("[!] Primary RC = %Rhra\n", rc)); \ 151 151 } while (0) 152 152 … … 164 164 info.isFullAvailable(), info.isBasicAvailable())); \ 165 165 if (info.isFullAvailable() || info.isBasicAvailable()) { \ 166 RTPrintf ("[!] Result Code = %R wa\n", info.getResultCode()); \166 RTPrintf ("[!] Result Code = %Rhra\n", info.getResultCode()); \ 167 167 RTPrintf ("[!] Text = %ls\n", info.getText().raw()); \ 168 RTPrintf ("[!] Component = %ls, Interface: %ls, {% Vuuid}\n", \168 RTPrintf ("[!] Component = %ls, Interface: %ls, {%RTuuid}\n", \ 169 169 info.getComponent().raw(), info.getInterfaceName().raw(), \ 170 170 info.getInterfaceID().raw()); \ 171 RTPrintf ("[!] Callee = %ls, {% Vuuid}\n", \171 RTPrintf ("[!] Callee = %ls, {%RTuuid}\n", \ 172 172 info.getCalleeName().raw(), info.getCalleeIID().raw()); \ 173 Log (("[!] Result Code = %R wa\n", info.getResultCode())); \173 Log (("[!] Result Code = %Rhra\n", info.getResultCode())); \ 174 174 Log (("[!] Text = %ls\n", info.getText().raw())); \ 175 Log (("[!] Component = %ls, Interface: %ls, {% Vuuid}\n", \175 Log (("[!] Component = %ls, Interface: %ls, {%RTuuid}\n", \ 176 176 info.getComponent().raw(), info.getInterfaceName().raw(), \ 177 177 info.getInterfaceID().raw())); \ 178 Log (("[!] Callee = %ls, {% Vuuid}\n", \178 Log (("[!] Callee = %ls, {%RTuuid}\n", \ 179 179 info.getCalleeName().raw(), info.getCalleeIID().raw())); \ 180 180 } \
Note:
See TracChangeset
for help on using the changeset viewer.