VirtualBox

Changeset 8309 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Apr 22, 2008 7:17:24 PM (17 years ago)
Author:
vboxsync
Message:

Main/Glue: Removed ErrorInfo::print() (functionality moved back to PRINT_ERROR_INFO macro).

Location:
trunk/include/VBox/com
Files:
2 edited

Legend:

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

    r8155 r8309  
    195195    bool isFullAvailable() const { return mIsFullAvailable; }
    196196
    197     /** 
     197    /**
    198198     *  Returns @c true if both isBasicAvailable() and isFullAvailable() are
    199      *  @c false. 
     199     *  @c false.
    200200     */
    201201    bool isNull() const { return !mIsBasicAvailable && !mIsFullAvailable; }
     
    248248     */
    249249    const Bstr &getCalleeName() const { return mCalleeName; }
    250 
    251     /**
    252      *  Prints error information stored in this instance to the console.
    253      *  Intended mainly for debugging and for simple command-line tools.
    254      *
    255      *  @param aPrefix  optional prefix
    256      */
    257     void print (const char *aPrefix = NULL);
    258250
    259251    /**
     
    382374    ~ErrorInfoKeeper() { if (!mForgot) restore(); }
    383375
    384     /** 
     376    /**
    385377     *  Tries to (re-)fetch error info set on the current thread.  On success,
    386378     *  the previous error information, if any, will be overwritten with the
  • trunk/include/VBox/com/assert.h

    r8155 r8309  
    159159#define PRINT_ERROR_INFO(info) \
    160160    do { \
    161         info.print ("[!] "); \
     161        RTPrintf ("[!] Full error info present: %RTbool, basic error info present: %RTbool\n", \
     162                  info.isFullAvailable(), info.isBasicAvailable()); \
     163        Log (("[!] Full error info present: %RTbool, basic error info present: %RTbool\n", \
     164              info.isFullAvailable(), info.isBasicAvailable())); \
     165        if (info.isFullAvailable() || info.isBasicAvailable()) { \
     166            RTPrintf ("[!] Result Code = %Rwa\n", info.getResultCode()); \
     167            RTPrintf ("[!] Text        = %ls\n", info.getText().raw()); \
     168            RTPrintf ("[!] Component   = %ls, Interface: %ls, {%Vuuid}\n", \
     169                      info.getComponent().raw(), info.getInterfaceName().raw(), \
     170                      info.getInterfaceID().raw()); \
     171            RTPrintf ("[!] Callee      = %ls, {%Vuuid}\n", \
     172                      info.getCalleeName().raw(), info.getCalleeIID().raw()); \
     173            Log (("[!] Result Code = %Rwa\n", info.getResultCode())); \
     174            Log (("[!] Text        = %ls\n", info.getText().raw())); \
     175            Log (("[!] Component   = %ls, Interface: %ls, {%Vuuid}\n", \
     176                  info.getComponent().raw(), info.getInterfaceName().raw(), \
     177                  info.getInterfaceID().raw())); \
     178            Log (("[!] Callee      = %ls, {%Vuuid}\n", \
     179                  info.getCalleeName().raw(), info.getCalleeIID().raw())); \
     180        } \
    162181    } while (0)
    163182
     
    210229        if (FAILED(rc)) { \
    211230            com::ErrorInfo info (iface); \
    212             info.print ("[!] "); \
     231            PRINT_ERROR_INFO (info); \
    213232        } \
    214233    } while (0)
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