VirtualBox

Changeset 8309

Show
Ignore:
Timestamp:
04/22/08 21:17:24 (9 months ago)
Author:
vboxsync
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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) 
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r8155 r8309  
    831831            RTPrintf ("Access error details:\n"); 
    832832            ErrorInfo ei (accessError); 
    833             ei.print ("[-] "); 
     833            PRINT_ERROR_INFO (ei); 
    834834            RTPrintf ("\n"); 
    835835        } 
  • trunk/src/VBox/Main/glue/ErrorInfo.cpp

    r8155 r8309  
    221221} 
    222222 
    223 void ErrorInfo::print (const char *aPrefix /* = NULL */) 
    224 { 
    225     if (aPrefix == NULL) 
    226         aPrefix = ""; 
    227  
    228     RTPrintf ("%sFull error info present: %RTbool, basic error info present: %RTbool\n", aPrefix, 
    229               mIsFullAvailable, mIsBasicAvailable); 
    230     if (mIsFullAvailable || mIsBasicAvailable) 
    231     { 
    232         RTPrintf ("%sResult Code = %Rwa\n", aPrefix, mResultCode); 
    233         RTPrintf ("%sText        = %ls\n", aPrefix, mText.raw()); 
    234         RTPrintf ("%sComponent   = %ls, Interface: %ls, {%s}\n", aPrefix, 
    235                   mComponent.raw(), mInterfaceName.raw(), mInterfaceID.toString().raw()); 
    236         RTPrintf ("%sCallee      = %ls, {%s}\n", aPrefix, mCalleeName.raw(), mCalleeIID.toString().raw()); 
    237     } 
    238 } 
    239  
    240223// ProgressErrorInfo class 
    241224//////////////////////////////////////////////////////////////////////////////// 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy