VirtualBox

Changeset 30716 in vbox


Ignore:
Timestamp:
Jul 7, 2010 4:40:45 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63481
Message:

release build fixes

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r30714 r30716  
    906906                             "Appliance::Task");
    907907
    908     ComAssertMsgRCRet(vrc,
    909                       ("Could not create OVF task thread (%Rrc)\n", vrc), E_FAIL);
     908    if (RT_FAILURE(vrc))
     909        return Appliance::setErrorStatic(E_FAIL,
     910                                         Utf8StrFmt("Could not create OVF task thread (%Rrc)\n", vrc));
    910911
    911912    return S_OK;
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r30714 r30716  
    67606760
    67616761    HRESULT hrc2 = (**aIt)->COMGETTER(Remote)(&fRemote);
    6762     ComAssertComRC(hrc2);
     6762    if (FAILED(hrc2))
     6763        setErrorStatic(hrc2, "GetRemote() failed");
    67636764
    67646765    if (fRemote)
     
    79027903         * (i.e. creating a snapshot online)
    79037904         */
    7904         ComAssertThrow(    (!pTask->bstrSavedStateFile.isEmpty() &&  pTask->fTakingSnapshotOnline)
    7905                         || ( pTask->bstrSavedStateFile.isEmpty() && !pTask->fTakingSnapshotOnline),
    7906                        rc = E_FAIL);
     7905        bool f =     (!pTask->bstrSavedStateFile.isEmpty() &&  pTask->fTakingSnapshotOnline)
     7906                  || ( pTask->bstrSavedStateFile.isEmpty() && !pTask->fTakingSnapshotOnline);
     7907        if (!f)
     7908            throw setErrorStatic(E_FAIL, "Invalid state of saved state file");
    79077909
    79087910        /* sync the state with the server */
  • trunk/src/VBox/Main/VFSExplorerImpl.cpp

    r30681 r30716  
    196196                             "Explorer::Task");
    197197
    198     ComAssertMsgRCRet(vrc,
    199                       ("Could not create taskThreadVFS (%Rrc)\n", vrc), E_FAIL);
     198    if (RT_FAILURE(vrc))
     199        return VFSExplorer::setErrorStatic(E_FAIL, Utf8StrFmt("Could not create taskThreadVFS (%Rrc)\n", vrc));
    200200
    201201    return vrc;
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r30714 r30716  
    9898
    9999    /* public methods only for internal purposes */
     100
     101    static HRESULT setErrorStatic(HRESULT aResultCode,
     102                                  const Utf8Str &aText)
     103    {
     104        return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
     105    }
    100106
    101107    /* private instance data */
  • trunk/src/VBox/Main/include/VFSExplorerImpl.h

    r30714 r30716  
    6565    STDMETHOD(Remove)(ComSafeArrayIn(IN_BSTR, aNames), IProgress **aProgress);
    6666
     67    /* public methods only for internal purposes */
     68
     69    static HRESULT setErrorStatic(HRESULT aResultCode,
     70                                  const Utf8Str &aText)
     71    {
     72        return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
     73    }
     74
    6775private:
    6876    /* Private member vars */
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r30714 r30716  
    157157    do { \
    158158        if (RT_UNLIKELY(!(expr))) \
    159             setErrorInternal(E_FAIL, \
    160                              getStaticClassIID(), \
    161                              getStaticComponentName(), \
    162                              Utf8StrFmt("Assertion failed: [%s] at '%s' (%d) in %s.\nPlease contact the product vendor!", \
    163                                         #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__), \
    164                              false, true); \
     159            setError(E_FAIL, \
     160                     "Assertion failed: [%s] at '%s' (%d) in %s.\nPlease contact the product vendor!", \
     161                     #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
    165162    } while (0)
    166163#endif
     
    181178    do { \
    182179        if (RT_UNLIKELY(!(expr))) \
    183             setErrorInternal(E_FAIL, \
    184                              getStaticClassIID(), \
    185                              getStaticComponentName(), \
    186                              Utf8StrFmt("Assertion failed: [%s] at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!", \
    187                                         #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__), \
    188                              false, true); \
     180            setError(E_FAIL, \
     181                     "Assertion failed: [%s] at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!", \
     182                     #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
    189183    } while (0)
    190184#endif
Note: See TracChangeset for help on using the changeset viewer.

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