VirtualBox

Changeset 8687 in vbox for trunk/include/VBox


Ignore:
Timestamp:
May 7, 2008 9:42:51 PM (17 years ago)
Author:
vboxsync
Message:

Use %Rhra instead of %Rwa. Dropped surpurfluous if (1)s.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/assert.h

    r8309 r8687  
    4141 */
    4242#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)
    4444
    4545/**
     
    5151 */
    5252#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)
    5454
    5555/**
     
    6161 */
    6262#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)
    6464
    6565/**
     
    7070 */
    7171#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))
    7373
    7474/**
     
    8080 */
    8181#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)
    8383
    8484/**
     
    8787 *
    8888 *  @param rc   COM result code
    89  *  @param eval the expression to evaluate
     89 *  @param eval the expression to throw
    9090 */
    9191#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)
    9393
    9494/**
     
    9999 */
    100100#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)
    102102
    103103/**
     
    108108 */
    109109#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)
    111111
    112112/**
     
    117117 */
    118118#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)
    120120
    121121/**
     
    126126 */
    127127#define CheckComRCBreakRC(rc)      \
    128     if (1) { if (!SUCCEEDED (rc)) { break; } } else do {} while (0)
     128    if (!SUCCEEDED (rc)) { break; } else do {} while (0)
    129129
    130130/**
     
    135135 */
    136136#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)
    138138
    139139/*
     
    147147#define PRINT_RC_MESSAGE(rc) \
    148148    do { \
    149         RTPrintf ("[!] Primary RC  = %Rwa\n", rc); \
    150         Log (("[!] Primary RC  = %Rwa\n", rc)); \
     149        RTPrintf ("[!] Primary RC  = %Rhra\n", rc); \
     150        Log (("[!] Primary RC  = %Rhra\n", rc)); \
    151151    } while (0)
    152152
     
    164164              info.isFullAvailable(), info.isBasicAvailable())); \
    165165        if (info.isFullAvailable() || info.isBasicAvailable()) { \
    166             RTPrintf ("[!] Result Code = %Rwa\n", info.getResultCode()); \
     166            RTPrintf ("[!] Result Code = %Rhra\n", info.getResultCode()); \
    167167            RTPrintf ("[!] Text        = %ls\n", info.getText().raw()); \
    168             RTPrintf ("[!] Component   = %ls, Interface: %ls, {%Vuuid}\n", \
     168            RTPrintf ("[!] Component   = %ls, Interface: %ls, {%RTuuid}\n", \
    169169                      info.getComponent().raw(), info.getInterfaceName().raw(), \
    170170                      info.getInterfaceID().raw()); \
    171             RTPrintf ("[!] Callee      = %ls, {%Vuuid}\n", \
     171            RTPrintf ("[!] Callee      = %ls, {%RTuuid}\n", \
    172172                      info.getCalleeName().raw(), info.getCalleeIID().raw()); \
    173             Log (("[!] Result Code = %Rwa\n", info.getResultCode())); \
     173            Log (("[!] Result Code = %Rhra\n", info.getResultCode())); \
    174174            Log (("[!] Text        = %ls\n", info.getText().raw())); \
    175             Log (("[!] Component   = %ls, Interface: %ls, {%Vuuid}\n", \
     175            Log (("[!] Component   = %ls, Interface: %ls, {%RTuuid}\n", \
    176176                  info.getComponent().raw(), info.getInterfaceName().raw(), \
    177177                  info.getInterfaceID().raw())); \
    178             Log (("[!] Callee      = %ls, {%Vuuid}\n", \
     178            Log (("[!] Callee      = %ls, {%RTuuid}\n", \
    179179                  info.getCalleeName().raw(), info.getCalleeIID().raw())); \
    180180        } \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette