VirtualBox

Changeset 14778 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 28, 2008 2:02:01 PM (16 years ago)
Author:
vboxsync
Message:

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

  • IConsole::reset
  • IConsole::pause
  • IConsole::resume
  • IConsole::powerButton
  • IConsole::sleepButton
Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r14775 r14778  
    16881688
    16891689    if (mMachineState != MachineState_Running)
    1690         return setError (E_FAIL, tr ("Cannot send the sleep button event as it is "
    1691                                      "not running (machine state: %d)"),
    1692                         mMachineState);
     1690        return setError (VBOX_E_INVALID_VM_STATE,
     1691            tr ("Cannot send the sleep button event as it is "
     1692            "not running (machine state: %d)"), mMachineState);
    16931693
    16941694    /* protect mpVM */
     
    17071707
    17081708    HRESULT rc = VBOX_SUCCESS (vrc) ? S_OK :
    1709         setError (E_FAIL,
     1709        setError (VBOX_E_PDM_ERROR,
    17101710            tr ("Sending sleep button event failed (%Rrc)"), vrc);
    17111711
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r14777 r14778  
    46464646
    46474647    <method name="reset">
    4648       <desc>Resets the virtual machine.</desc>
     4648      <desc>Resets the virtual machine.
     4649        <result name="VBOX_E_INVALID_VM_STATE">
     4650          Virtual machine not in Running state.
     4651        </result>
     4652        <result name="VBOX_E_VM_ERROR">
     4653          Virtual machine error in reset operation.
     4654        </result>
     4655      </desc>
    46494656    </method>
    46504657
    46514658    <method name="pause">
    4652       <desc>Pauses the virtual machine execution.</desc>
     4659      <desc>Pauses the virtual machine execution.
     4660        <result name="VBOX_E_INVALID_VM_STATE">
     4661          Virtual machine not in Running state.
     4662        </result>
     4663        <result name="VBOX_E_VM_ERROR">
     4664          Virtual machine error in suspend operation.
     4665        </result>
     4666      </desc>
    46534667    </method>
    46544668
    46554669    <method name="resume">
    4656       <desc>Resumes the virtual machine execution.</desc>
     4670      <desc>Resumes the virtual machine execution.
     4671        <result name="VBOX_E_INVALID_VM_STATE">
     4672          Virtual machine not in Paused state.
     4673        </result>
     4674        <result name="VBOX_E_VM_ERROR">
     4675          Virtual machine error in resume operation.
     4676        </result>
     4677      </desc>
    46574678    </method>
    46584679
    46594680    <method name="powerButton">
    4660       <desc>Send the ACPI power button event to the guest.</desc>
     4681      <desc>Send the ACPI power button event to the guest.
     4682        <result name="VBOX_E_INVALID_VM_STATE">
     4683          Virtual machine not in Running state.
     4684        </result>
     4685        <result name="VBOX_E_PDM_ERROR">
     4686          Controlled power off failed.
     4687        </result>
     4688      </desc>
    46614689    </method>
    46624690
    46634691    <method name="sleepButton">
    4664       <desc>Send the ACPI sleep button event to the guest.</desc>
     4692      <desc>Sends the ACPI sleep button event to the guest.
     4693        <result name="VBOX_E_INVALID_VM_STATE">
     4694          Virtual machine not in Running state.
     4695        </result>
     4696        <result name="VBOX_E_PDM_ERROR">
     4697          Sending sleep button event failed.
     4698        </result>
     4699      </desc>
    46654700    </method>
    46664701
    46674702    <method name="getPowerButtonHandled">
    4668       <desc>Check if the last power button event was handled by guest.</desc>
     4703      <desc>Checks if the last power button event was handled by guest.
     4704      </desc>
    46694705      <param name="handled" type="boolean" dir="return"/>
    46704706    </method>
    46714707
    46724708    <method name="getGuestEnteredACPIMode">
    4673       <desc>Check if the guest entered the ACPI mode G0 (working) or
     4709      <desc>Checks if the guest entered the ACPI mode G0 (working) or
    46744710        G1 (sleeping). If this method returns false, the guest will
    46754711        most likely not respond to external ACPI events.</desc>
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