Changeset 8309 in vbox
- Timestamp:
- Apr 22, 2008 7:17:24 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30066
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/ErrorInfo.h
r8155 r8309 195 195 bool isFullAvailable() const { return mIsFullAvailable; } 196 196 197 /** 197 /** 198 198 * Returns @c true if both isBasicAvailable() and isFullAvailable() are 199 * @c false. 199 * @c false. 200 200 */ 201 201 bool isNull() const { return !mIsBasicAvailable && !mIsFullAvailable; } … … 248 248 */ 249 249 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 prefix256 */257 void print (const char *aPrefix = NULL);258 250 259 251 /** … … 382 374 ~ErrorInfoKeeper() { if (!mForgot) restore(); } 383 375 384 /** 376 /** 385 377 * Tries to (re-)fetch error info set on the current thread. On success, 386 378 * the previous error information, if any, will be overwritten with the -
trunk/include/VBox/com/assert.h
r8155 r8309 159 159 #define PRINT_ERROR_INFO(info) \ 160 160 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 } \ 162 181 } while (0) 163 182 … … 210 229 if (FAILED(rc)) { \ 211 230 com::ErrorInfo info (iface); \ 212 info.print ("[!] "); \231 PRINT_ERROR_INFO (info); \ 213 232 } \ 214 233 } while (0) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r8155 r8309 831 831 RTPrintf ("Access error details:\n"); 832 832 ErrorInfo ei (accessError); 833 ei.print ("[-] ");833 PRINT_ERROR_INFO (ei); 834 834 RTPrintf ("\n"); 835 835 } -
trunk/src/VBox/Main/glue/ErrorInfo.cpp
r8155 r8309 221 221 } 222 222 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 240 223 // ProgressErrorInfo class 241 224 ////////////////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.