Changeset 15050 in vbox for trunk/src/VBox/Main/MachineImpl.cpp
- Timestamp:
- Dec 5, 2008 3:38:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r15039 r15050 1808 1808 1809 1809 if (aDevice == DeviceType_USB) 1810 return setError (E_ FAIL,1811 tr ("Booting from USB device s is not currentlysupported"));1810 return setError (E_NOTIMPL, 1811 tr ("Booting from USB device is currently not supported")); 1812 1812 1813 1813 AutoCaller autoCaller (this); … … 1865 1865 { 1866 1866 if (aChannel < 0 || aChannel > 1) 1867 return setError (E_ FAIL,1867 return setError (E_INVALIDARG, 1868 1868 tr ("Invalid IDE channel: %l (must be in range [0, 1])"), 1869 1869 aChannel); … … 1872 1872 { 1873 1873 if (aDevice < 0 || aDevice > 1) 1874 return setError (E_ FAIL,1874 return setError (E_INVALIDARG, 1875 1875 tr ("Invalid IDE device slot: %l (must be in range " 1876 1876 "[0, 1] for channel 0)"), … … 1882 1882 /* Device slot 0 is reserved for the CD/DVD drive. */ 1883 1883 if (aDevice != 1) 1884 return setError (E_ FAIL,1884 return setError (E_INVALIDARG, 1885 1885 tr ("Invalid IDE device slot: %l (must be " 1886 1886 "1 for channel 1)"), … … 1904 1904 /// @todo NEWMEDIA implicit machine registration 1905 1905 if (!mData->mRegistered) 1906 return setError ( E_FAIL,1906 return setError (VBOX_E_INVALID_OBJECT_STATE, 1907 1907 tr ("Cannot attach hard disks to an unregistered machine")); 1908 1908 … … 1910 1910 1911 1911 if (mData->mMachineState >= MachineState_Running) 1912 return setError ( E_FAIL,1912 return setError (VBOX_E_INVALID_VM_STATE, 1913 1913 tr ("Invalid machine state: %d"), mData->mMachineState); 1914 1914 … … 1923 1923 ComObjPtr <HardDisk2> hd = (*it)->hardDisk(); 1924 1924 AutoReadLock hdLock (hd); 1925 return setError ( E_FAIL,1925 return setError (VBOX_E_OBJECT_IN_USE, 1926 1926 tr ("Hard disk '%ls' is already attached to device slot %d on " 1927 1927 "channel %d of bus %d of this virtual machine"), … … 1946 1946 mHDData->mAttachments.end()) 1947 1947 { 1948 return setError ( E_FAIL,1948 return setError (VBOX_E_OBJECT_IN_USE, 1949 1949 tr ("Hard disk '%ls' is already attached to this virtual machine"), 1950 1950 hd->locationFull().raw()); … … 2189 2189 LONG aDevice, IHardDisk2 **aHardDisk) 2190 2190 { 2191 if (aBus == StorageBus_Null)2192 return E_INVALIDARG;2191 CheckComArgExpr(aBus, aBus != StorageBus_Null); 2192 CheckComArgOutPointerValid(aHardDisk); 2193 2193 2194 2194 AutoCaller autoCaller (this); … … 2205 2205 2206 2206 if (it == mHDData->mAttachments.end()) 2207 return setError ( E_INVALIDARG,2207 return setError (VBOX_E_OBJECT_NOT_FOUND, 2208 2208 tr ("No hard disk attached to device slot %d on channel %d of bus %d"), 2209 2209 aDevice, aChannel, aBus); … … 2217 2217 LONG aDevice) 2218 2218 { 2219 if (aBus == StorageBus_Null) 2220 return E_INVALIDARG; 2219 CheckComArgExpr(aBus, aBus != StorageBus_Null); 2221 2220 2222 2221 AutoCaller autoCaller (this); … … 2231 2230 2232 2231 if (mData->mMachineState >= MachineState_Running) 2233 return setError ( E_FAIL,2232 return setError (VBOX_E_INVALID_VM_STATE, 2234 2233 tr ("Invalid machine state: %d"), mData->mMachineState); 2235 2234 … … 2240 2239 2241 2240 if (it == mHDData->mAttachments.end()) 2242 return setError ( E_INVALIDARG,2241 return setError (VBOX_E_OBJECT_NOT_FOUND, 2243 2242 tr ("No hard disk attached to device slot %d on channel %d of bus %d"), 2244 2243 aDevice, aChannel, aBus);
Note:
See TracChangeset
for help on using the changeset viewer.