VirtualBox

Changeset 14700

Show
Ignore:
Timestamp:
11/27/08 13:23:25 (1 month ago)
Author:
vboxsync
Message:

#3285: Improve error handling API to include unique error numbers
document createDiffStorage's E_VBOX_OBJECT_IN_USE.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Main/HardDisk2Impl.cpp

    r14698 r14700  
    19291929 * As opposed to the CreateDiffStorage() method, this method doesn't try to lock 
    19301930 * this hard disk for reading assuming that the caller has already done so. This 
    1931  * is used when taking an online snaopshot (where all origial hard disks are 
     1931 * is used when taking an online snaopshot (where all original hard disks are 
    19321932 * locked for writing and must remain such). Note however that if @a aWait is 
    19331933 * @c false and this method returns a success then the thread started by 
    1934  * this method will* unlock the hard disk (unless it is in 
     1934 * this method will unlock the hard disk (unless it is in 
    19351935 * MediaState_LockedWrite state) so make sure the hard disk is either in 
    19361936 * MediaState_LockedWrite or call #LockRead() before calling this method! If @a 
     
    19401940 * If @a aProgress is not NULL but the object it points to is @c null then a new 
    19411941 * progress object will be created and assigned to @a *aProgress on success, 
    1942  * otherwise the existing progress object is used. If Progress is NULL, then no 
     1942 * otherwise the existing progress object is used. If @a aProgress is NULL, then no 
    19431943 * progress object is created/used at all. 
    19441944 * 
     
    19551955 *                      an asynchronous thread. 
    19561956 * 
    1957  * @note Locks this object and aTarget for writing. 
     1957 * @note Locks this object and @a aTarget for writing. 
    19581958 */ 
    19591959HRESULT HardDisk2::createDiffStorage (ComObjPtr <HardDisk2> &aTarget, 
     
    20002000            if (it->snapshotIds.size() == 0) 
    20012001            { 
    2002                 return setError (E_FAIL
     2002                return setError (VBOX_E_OBJECT_IN_USE
    20032003                    tr ("Hard disk '%ls' is attached to a virtual machine " 
    20042004                        "with UUID {%RTuuid}. No differencing hard disks " 
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r14699 r14700  
    73797379 
    73807380        <result name="VBOX_E_OBJECT_IN_USE"> 
    7381           Hard disk is still attached to a virtual machine. 
     7381          Hard disk is attached to a virtual machine. 
    73827382        </result> 
    73837383      </desc> 
     
    74077407 
    74087408        <note> 
    7409           The hard disk will be placed to <link to="MediaState::LockedRead"/> 
     7409          The hard disk will be set to <link to="MediaState::LockedRead"/> 
    74107410          state for the duration of this operation. 
    74117411        </note> 
    7412       </desc> <param name="target" type="IHardDisk2" dir="in"> 
     7412        <result name="VBOX_E_OBJECT_IN_USE"> 
     7413          Hard disk not in NotCreated state. 
     7414        </result> 
     7415      </desc> 
     7416      <param name="target" type="IHardDisk2" dir="in"> 
    74137417        <desc>Target hard disk.</desc> 
    74147418      </param> 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy