VirtualBox

儲存庫 vbox 的更動 15039


忽略:
時間撮記:
2008-12-5 下午01:07:27 (16 年 以前)
作者:
vboxsync
訊息:

#3285: Improve error handling API to include unique error numbers
Document/improve IInternalMachineControl results.

位置:
trunk/src/VBox/Main
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/MachineImpl.cpp

    r14972 r15039  
    80438043 *  @note Locks the same as #setMachineState() does.
    80448044 */
    8045 STDMETHODIMP SessionMachine::UpdateState (MachineState_T machineState)
    8046 {
    8047     return setMachineState (machineState);
     8045STDMETHODIMP SessionMachine::UpdateState (MachineState_T aMachineState)
     8046{
     8047    return setMachineState (aMachineState);
    80488048}
    80498049
     
    80518051 *  @note Locks this object for reading.
    80528052 */
    8053 STDMETHODIMP SessionMachine::GetIPCId (BSTR *id)
     8053STDMETHODIMP SessionMachine::GetIPCId (BSTR *aId)
    80548054{
    80558055    AutoCaller autoCaller (this);
     
    80598059
    80608060#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
    8061     mIPCSemName.cloneTo (id);
     8061    mIPCSemName.cloneTo (aId);
    80628062    return S_OK;
    80638063#elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
    8064     mData->mConfigFileFull.cloneTo (id);
     8064    mData->mConfigFileFull.cloneTo (aId);
    80658065    return S_OK;
    80668066#else
     
    81158115    return service->captureDeviceForVM (this, aId);
    81168116#else
    8117     return E_FAIL;
     8117    return E_NOTIMPL;
    81188118#endif
    81198119}
     
    81348134    return service->detachDeviceFromVM (this, aId, !!aDone);
    81358135#else
    8136     return E_FAIL;
     8136    return E_NOTIMPL;
    81378137#endif
    81388138}
     
    83748374    int vrc = calculateFullPath (stateFilePathFull, stateFilePathFull);
    83758375    if (RT_FAILURE (vrc))
    8376         return setError (E_FAIL,
     8376        return setError (VBOX_E_FILE_ERROR,
    83778377            tr ("Invalid saved state file path '%ls' (%Rrc)"),
    83788378                aSavedStateFile, vrc);
     
    86058605        size_t childrenCount = snapshot->children().size();
    86068606        if (childrenCount > 1)
    8607             return setError (E_FAIL,
     8607            return setError (VBOX_E_INVALID_OBJECT_STATE,
    86088608                tr ("Snapshot '%ls' of the machine '%ls' has more than one "
    86098609                    "child snapshot (%d)"),
     
    86788678
    86798679    if (mData->mCurrentSnapshot.isNull())
    8680         return setError (E_FAIL,
     8680        return setError (VBOX_E_INVALID_OBJECT_STATE,
    86818681            tr ("Could not discard the current state of the machine '%ls' "
    86828682                "because it doesn't have any snapshots"),
     
    87428742
    87438743    if (mData->mCurrentSnapshot.isNull())
    8744         return setError (E_FAIL,
     8744        return setError (VBOX_E_INVALID_OBJECT_STATE,
    87458745            tr ("Could not discard the current state of the machine '%ls' "
    87468746                "because it doesn't have any snapshots"),
     
    89228922    using namespace guestProp;
    89238923
    8924     if (!VALID_PTR(aName))
    8925         return E_POINTER;
     8924    CheckComArgNotNull(aName);
    89268925    if ((aValue != NULL) && (!VALID_PTR(aValue) || !VALID_PTR(aFlags)))
    89278926        return E_POINTER;  /* aValue can be NULL to indicate deletion */
     
    89418940
    89428941    bool matchAll = false;
    8943     if (0 == utf8Patterns.length())
     8942    if (utf8Patterns.length() == 0)
    89448943        matchAll = true;
    89458944
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r15027 r15039  
    27262726        the state previously requested by #beginSavingState is either
    27272727        successfully finished or there was a failure.
     2728
     2729        <result name="VBOX_E_FILE_ERROR">
     2730          Settings file not accessible.
     2731        </result>
     2732        <result name="VBOX_E_XML_ERROR">
     2733          Could not parse the settings file.
     2734        </result>
     2735
    27282736      </desc>
    27292737
    27302738      <param name="success" type="boolean" dir="in">
    2731         <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
     2739        <desc><tt>true</tt> to indicate success and <tt>false</tt>
     2740          otherwise.
     2741        </desc>
    27322742      </param>
    27332743    </method>
     
    27362746      <desc>
    27372747        Gets called by IConsole::adoptSavedState.
     2748        <result name="VBOX_E_FILE_ERROR">
     2749          Invalid saved state file path.
     2750        </result>
    27382751      </desc>
    27392752      <param name="savedStateFile" type="wstring" dir="in">
     
    27462759        Called by the VM process to inform the server it wants to
    27472760        take a snapshot.
     2761
     2762        <result name="VBOX_E_FILE_ERROR">
     2763          Settings file not accessible.
     2764        </result>
     2765        <result name="VBOX_E_XML_ERROR">
     2766          Could not parse the settings file.
     2767        </result>
    27482768      </desc>
    27492769      <param name="initiator" type="IConsole" dir="in">
     
    27512771      </param>
    27522772      <param name="name" type="wstring" dir="in">
    2753         <desc>Snapshot name</desc>
     2773        <desc>Snapshot name.</desc>
    27542774      </param>
    27552775      <param name="description" type="wstring" dir="in">
    2756         <desc>Snapshot description</desc>
     2776        <desc>Snapshot description.</desc>
    27572777      </param>
    27582778      <param name="progress" type="IProgress" dir="in">
     
    27902810      <desc>
    27912811        Gets called by IConsole::discardSnapshot.
     2812        <result name="VBOX_E_INVALID_OBJECT_STATE">
     2813          Snapshot has more than one child snapshot.
     2814        </result>
    27922815      </desc>
    27932816      <param name="initiator" type="IConsole" dir="in">
     
    28082831      <desc>
    28092832        Gets called by IConsole::discardCurrentState.
     2833        <result name="VBOX_E_INVALID_OBJECT_STATE">
     2834          Virtual machine does not have any snapshot.
     2835        </result>
    28102836      </desc>
    28112837      <param name="initiator" type="IConsole" dir="in">
     
    28232849      <desc>
    28242850        Gets called by IConsole::discardCurrentSnapshotAndState.
     2851        <result name="VBOX_E_INVALID_OBJECT_STATE">
     2852          Virtual machine does not have any snapshot.
     2853        </result>
    28252854      </desc>
    28262855      <param name="initiator" type="IConsole" dir="in">
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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