VirtualBox

Changeset 14770 in vbox for trunk/src


Ignore:
Timestamp:
Nov 28, 2008 11:04:41 AM (16 years ago)
Author:
vboxsync
Message:

#3285: Improve error handling API to include unique error numbers
Document IConsole::powerUp

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

Legend:

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

    r14715 r14770  
    42744274
    42754275    if (mMachineState >= MachineState_Running)
    4276         return setError(E_FAIL, tr ("Virtual machine is already running "
    4277                                     "(machine state: %d)"),
    4278                         mMachineState);
     4276        return setError(VBOX_E_INVALID_VM_STATE,
     4277            tr ("Virtual machine is already running "
     4278            "(machine state: %d)"), mMachineState);
    42794279
    42804280    HRESULT rc = S_OK;
     
    43024302                if (!hostif)
    43034303                {
    4304                     return setError (E_FAIL,
     4304                    return setError (VBOX_E_HOST_ERROR,
    43054305                        tr ("VM cannot start because host interface networking "
    43064306                            "requires a host interface name to be set"));
     
    43154315                if (!SUCCEEDED(coll->FindByName(hostif, hostInterface.asOutParam())))
    43164316                {
    4317                     return setError (E_FAIL,
     4317                    return setError (VBOX_E_HOST_ERROR,
    43184318                        tr ("VM cannot start because the host interface '%ls' "
    43194319                            "does not exist"),
     
    43634363        int vrc = SSMR3ValidateFile (Utf8Str (savedStateFile));
    43644364        if (VBOX_FAILURE (vrc))
    4365             return setError (E_FAIL,
     4365            return setError (VBOX_E_FILE_ERROR,
    43664366                tr ("VM cannot start because the saved state file '%ls' is invalid (%Rrc). "
    43674367                    "Discard the saved state prior to starting the VM"),
     
    74567456    NULL
    74577457};
    7458 
     7458/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r14769 r14770  
    310310  </result>
    311311
     312  <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
     313    <desc>
     314       Host operating system related error.
     315    </desc>
     316  </result>
     317
    312318  <!--
    313319    Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
     
    45624568
    45634569        <see>#saveState</see>
     4570        <result name="VBOX_E_INVALID_VM_STATE">
     4571          Virtual machine already running.
     4572        </result>
     4573        <result name="VBOX_E_HOST_ERROR">
     4574          Host interface does not exist or name not set.
     4575        </result>
     4576        <result name="VBOX_E_FILE_ERROR">
     4577          Invalid saved state file.
     4578        </result>
    45644579      </desc>
    45654580      <param name="progress" type="IProgress" dir="return">
Note: See TracChangeset for help on using the changeset viewer.

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