VirtualBox

Changeset 14843 in vbox for trunk/src


Ignore:
Timestamp:
Dec 1, 2008 10:05:21 AM (16 years ago)
Author:
vboxsync
Message:

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

  • IConsole::getDeviceActivity
  • IConsole::attachUSBDevice
  • IConsole::detachUSBDevice
Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r14793 r14843  
    20222022    if (mMachineState != MachineState_Running &&
    20232023        mMachineState != MachineState_Paused)
    2024         return setError (E_FAIL,
     2024        return setError (VBOX_E_INVALID_VM_STATE,
    20252025            tr ("Cannot attach a USB device to the machine which is not running "
    20262026                "(machine state: %d)"), mMachineState);
     
    20342034    int vrc = PDMR3QueryLun (mpVM, "usb-ohci", 0, 0, &pBase);
    20352035    if (VBOX_FAILURE (vrc))
    2036         return setError (E_FAIL,
     2036        return setError (VBOX_E_PDM_ERROR,
    20372037            tr ("The virtual machine does not have a USB controller"));
    20382038
     
    20482048
    20492049#else   /* !VBOX_WITH_USB */
    2050     return setError (E_FAIL,
     2050    return setError (VBOX_E_PDM_ERROR,
    20512051        tr ("The virtual machine does not have a USB controller"));
    20522052#endif  /* !VBOX_WITH_USB */
     
    21092109
    21102110#else   /* !VBOX_WITH_USB */
    2111     return setError (E_INVALIDARG,
    2112         tr ("USB device with UUID {%RTuuid} is not attached to this machine"),
    2113         Guid (aId).raw());
     2111    return setError (VBOX_E_PDM_ERROR,
     2112        tr ("The virtual machine does not have a USB controller"));
    21142113#endif  /* !VBOX_WITH_USB */
    21152114}
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r14842 r14843  
    48284828      <desc>
    48294829        Gets the current activity type of a given device or device group.
     4830        <result name="E_INVALIDARG">
     4831          Invalid device type.
     4832        </result>
    48304833      </desc>
    48314834      <param name="type" type="DeviceType" dir="in"/>
     
    48494852
    48504853        <see>IUSBController::deviceFilters, USBDeviceState</see>
     4854        <result name="VBOX_E_INVALID_VM_STATE">
     4855          Virtual machine state neither Running nor Paused.
     4856        </result>
     4857        <result name="VBOX_E_PDM_ERROR">
     4858          Virtual machine does not have a USB controller.
     4859        </result>
    48514860      </desc>
    48524861      <param name="id" type="uuid" dir="in">
     
    48664875
    48674876        <see>IUSBController::deviceFilters, USBDeviceState</see>
     4877
     4878        <result name="VBOX_E_PDM_ERROR">
     4879          Virtual machine does not have a USB controller.
     4880        </result>
     4881        <result name="E_INVALIDARG">
     4882          USB device not attached to this virtual machine.
     4883        </result>
    48684884      </desc>
    48694885      <param name="id" type="uuid" dir="in">
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