VirtualBox

Changeset 14569 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Nov 25, 2008 1:04:37 PM (16 years ago)
Author:
vboxsync
Message:

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

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

Legend:

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

    r14568 r14569  
    15331533
    15341534    if (mMachineState != MachineState_Paused)
    1535         return setError (E_FAIL, tr ("Cannot resume the machine as it is "
    1536                                      "not paused (machine state: %d)"),
    1537                         mMachineState);
     1535        return setError (VBOX_E_INVALID_VM_STATE,
     1536            tr ("Cannot resume the machine as it is not paused "
     1537                "(machine state: %d)"), mMachineState);
    15381538
    15391539    /* protect mpVM */
     
    15531553
    15541554    HRESULT rc = VBOX_SUCCESS (vrc) ? S_OK :
    1555         setError (E_FAIL,
     1555        setError (VBOX_E_VM_ERROR,
    15561556            tr ("Could not resume the machine execution (%Rrc)"), vrc);
    15571557
     
    15711571
    15721572    if (mMachineState != MachineState_Running)
    1573         return setError (E_FAIL, tr ("Cannot power off the machine as it is "
    1574                                      "not running (machine state: %d)"),
    1575                         mMachineState);
     1573        return setError (VBOX_E_INVALID_VM_STATE,
     1574            tr ("Cannot power off the machine as it is not running "
     1575                "(machine state: %d)"), mMachineState);
    15761576
    15771577    /* protect mpVM */
     
    15901590
    15911591    HRESULT rc = VBOX_SUCCESS (vrc) ? S_OK :
    1592         setError (E_FAIL,
     1592        setError (VBOX_E_PDM_ERROR,
    15931593            tr ("Controlled power off failed (%Rrc)"), vrc);
    15941594
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r14568 r14569  
    185185  </result>
    186186
     187  <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
     188    <desc>
     189       Pluggable Device Manager error.
     190    </desc>
     191  </result>
     192
    187193  <!--
    188194  // all common enums
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