Changeset 6975 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Feb 15, 2008 5:32:46 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/COMDefs.h
r6900 r6975 195 195 * Returns error info set by the last unsuccessfully invoked interface 196 196 * method. Returned error info is useful only if CInterface::lastRC() 197 * represents a failure (i.e. CInterface::isOk() is false). 197 * represents a failure or a warning (i.e. CInterface::isReallyOk() is 198 * false). 198 199 */ 199 200 virtual COMErrorInfo errorInfo() const { return COMErrorInfo(); } … … 473 474 * Returns error info set by the last unsuccessfully invoked interface 474 475 * method. Returned error info is useful only if CInterface::lastRC() 475 * represents a failure (i.e. CInterface::isOk() is false). 476 * represents a failure or a warning (i.e. CInterface::isReallyOk() is 477 * false). 476 478 */ 477 479 COMErrorInfo errorInfo() const { return mErrInfo; } … … 517 519 518 520 bool isNull() const { return mErrInfo.isNull(); } 519 bool isOk() const { return mErrInfo.isNull() && SUCCEEDED (mRC); } 521 522 /** 523 * Returns @c true if the result code repesents success (with or without 524 * warnings). 525 */ 526 bool isOk() const { return SUCCEEDED (mRC); } 527 528 /** 529 * Returns @c true if the result code represends success with one or more 530 * warnings. 531 */ 532 bool isWarning() const { return SUCCEEDED_WARNING (mRC); } 533 534 /** 535 * Returns @c true if the result code represends success with no warnings. 536 */ 537 bool isReallyOk() const { return mRC == S_OK; } 520 538 521 539 COMErrorInfo errorInfo() const { return mErrInfo; } … … 624 642 bool isNull() const { return mIface == NULL; } 625 643 644 /** 645 * Returns @c true if the result code repesents success (with or without 646 * warnings). 647 */ 626 648 bool isOk() const { return !isNull() && SUCCEEDED (B::mRC); } 649 650 /** 651 * Returns @c true if the result code represends success with one or more 652 * warnings. 653 */ 654 bool isWarning() const { return !isNull() && SUCCEEDED_WARNING (B::mRC); } 655 656 /** 657 * Returns @c true if the result code represends success with no warnings. 658 */ 659 bool isReallyOk() const { return !isNull() && B::mRC == S_OK; } 627 660 628 661 /* utility operators */ -
trunk/src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl
r6907 r6975 906 906 <xsl:otherwise> 907 907 <xsl:if test="$supports='strict' or $supports='yes'"> 908 <xsl:text> if ( FAILED (mRC))
 {
</xsl:text>908 <xsl:text> if (mRC != S_OK)
 {
</xsl:text> 909 909 <xsl:text> fetchErrorInfo (mIface, &COM_IIDOF (Base::Iface));
</xsl:text> 910 910 <xsl:if test="$supports='strict'"> -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r5999 r6975 289 289 static QString formatErrorInfo (const COMBase &aWrapper) 290 290 { 291 Assert ( FAILED (aWrapper.lastRC()));291 Assert (aWrapper.lastRC() != S_OK); 292 292 return formatErrorInfo (aWrapper.errorInfo(), aWrapper.lastRC()); 293 293 } … … 295 295 static QString formatErrorInfo (const COMResult &aRC) 296 296 { 297 Assert ( FAILED (aRC.rc()));297 Assert (aRC.rc() != S_OK); 298 298 return formatErrorInfo (aRC.errorInfo(), aRC.rc()); 299 299 }
Note:
See TracChangeset
for help on using the changeset viewer.