Changeset 15178 in vbox for trunk/src/VBox/Main/MediumImpl.cpp
- Timestamp:
- Dec 9, 2008 2:40:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumImpl.cpp
r15124 r15178 238 238 ComSafeGUIDArrayOut (aSnapshotIds)) 239 239 { 240 if (Guid (aMachineId).isEmpty()) 241 return E_INVALIDARG; 242 if (ComSafeGUIDArrayOutIsNull (aSnapshotIds)) 243 return E_POINTER; 240 CheckComArgExpr(aMachineId, Guid (aMachineId).isEmpty() == false); 241 CheckComArgSafeArrayNotNull(aSnapshotIds); 244 242 245 243 AutoCaller autoCaller (this); … … 372 370 default: 373 371 { 374 rc = setError ( E_FAIL,372 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 375 373 tr ("Medium '%ls' is not locked for reading"), 376 374 m.locationFull.raw()); … … 451 449 default: 452 450 { 453 rc = setError ( E_FAIL,451 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 454 452 tr ("Medium '%ls' is not locked for writing"), 455 453 m.locationFull.raw()); … … 497 495 498 496 if (m.backRefs.size() != 0) 499 return setError ( E_FAIL,497 return setError (VBOX_E_OBJECT_IN_USE, 500 498 tr ("Medium '%ls' is attached to %d virtual machines"), 501 499 m.locationFull.raw(), m.backRefs.size()); … … 855 853 case MediaState_NotCreated: 856 854 { 857 rc = setError ( E_FAIL,855 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 858 856 tr ("Storage for the medium '%ls' is not created"), 859 857 m.locationFull.raw()); … … 862 860 case MediaState_Created: 863 861 { 864 rc = setError ( E_FAIL,862 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 865 863 tr ("Storage for the medium '%ls' is already created"), 866 864 m.locationFull.raw()); … … 869 867 case MediaState_LockedRead: 870 868 { 871 rc = setError ( E_FAIL,869 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 872 870 tr ("Medium '%ls' is locked for reading by another task"), 873 871 m.locationFull.raw()); … … 876 874 case MediaState_LockedWrite: 877 875 { 878 rc = setError ( E_FAIL,876 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 879 877 tr ("Medium '%ls' is locked for writing by another task"), 880 878 m.locationFull.raw()); … … 885 883 /* be in sync with Console::powerUpThread() */ 886 884 if (!m.lastAccessError.isEmpty()) 887 rc = setError ( E_FAIL,885 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 888 886 tr ("Medium '%ls' is not accessible. %ls"), 889 887 m.locationFull.raw(), m.lastAccessError.raw()); 890 888 else 891 rc = setError ( E_FAIL,889 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 892 890 tr ("Medium '%ls' is not accessible"), 893 891 m.locationFull.raw()); … … 896 894 case MediaState_Creating: 897 895 { 898 rc = setError ( E_FAIL,896 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 899 897 tr ("Storage for the medium '%ls' is being created"), 900 898 m.locationFull.raw(), m.lastAccessError.raw()); … … 903 901 case MediaState_Deleting: 904 902 { 905 rc = setError ( E_FAIL,903 rc = setError (VBOX_E_INVALID_OBJECT_STATE, 906 904 tr ("Storage for the medium '%ls' is being deleted"), 907 905 m.locationFull.raw(), m.lastAccessError.raw());
Note:
See TracChangeset
for help on using the changeset viewer.