VirtualBox

Changeset 14579 in vbox for trunk/src


Ignore:
Timestamp:
Nov 25, 2008 3:59:35 PM (16 years ago)
Author:
vboxsync
Message:

Main: VirtualBoxBase::addCaller() now returns E_ACCESSDENIED. Also replaced E_UNEXPECTED with E_FAIL in all Assert* statements (for consistency).

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

Legend:

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

    r8155 r14579  
    5757    /* Enclose the state transition NotReady->InInit->Ready */
    5858    AutoInitSpan autoInitSpan (this);
    59     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     59    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6060
    6161    unconst (mParent) = aParent;
     
    8888    /* Enclose the state transition NotReady->InInit->Ready */
    8989    AutoInitSpan autoInitSpan (this);
    90     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     90    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    9191
    9292    unconst (mParent) = aParent;
     
    120120    /* Enclose the state transition NotReady->InInit->Ready */
    121121    AutoInitSpan autoInitSpan (this);
    122     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     122    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    123123
    124124    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/BIOSSettingsImpl.cpp

    r14558 r14579  
    5555    /* Enclose the state transition NotReady->InInit->Ready */
    5656    AutoInitSpan autoInitSpan (this);
    57     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     57    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    5858
    5959    /* share the parent weakly */
     
    8585    /* Enclose the state transition NotReady->InInit->Ready */
    8686    AutoInitSpan autoInitSpan (this);
    87     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     87    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    8888
    8989    mParent = aParent;
     
    113113    /* Enclose the state transition NotReady->InInit->Ready */
    114114    AutoInitSpan autoInitSpan (this);
    115     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     115    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    116116
    117117    mParent = aParent;
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r14569 r14579  
    300300    /* Enclose the state transition NotReady->InInit->Ready */
    301301    AutoInitSpan autoInitSpan (this);
    302     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     302    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    303303
    304304    LogFlowThisFuncEnter();
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r13860 r14579  
    20372037    /* Enclose the state transition NotReady->InInit->Ready */
    20382038    AutoInitSpan autoInitSpan (this);
    2039     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     2039    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    20402040
    20412041    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/DVDDriveImpl.cpp

    r13580 r14579  
    6565    /* Enclose the state transition NotReady->InInit->Ready */
    6666    AutoInitSpan autoInitSpan (this);
    67     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     67    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6868
    6969    unconst (mParent) = aParent;
     
    9696    /* Enclose the state transition NotReady->InInit->Ready */
    9797    AutoInitSpan autoInitSpan (this);
    98     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     98    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    9999
    100100    unconst (mParent) = aParent;
     
    128128    /* Enclose the state transition NotReady->InInit->Ready */
    129129    AutoInitSpan autoInitSpan (this);
    130     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     130    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    131131
    132132    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r13837 r14579  
    120120    /* Enclose the state transition NotReady->InInit->Ready */
    121121    AutoInitSpan autoInitSpan (this);
    122     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     122    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    123123
    124124    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/FloppyDriveImpl.cpp

    r13580 r14579  
    6565    /* Enclose the state transition NotReady->InInit->Ready */
    6666    AutoInitSpan autoInitSpan (this);
    67     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     67    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6868
    6969    unconst (mParent) = aParent;
     
    9696    /* Enclose the state transition NotReady->InInit->Ready */
    9797    AutoInitSpan autoInitSpan (this);
    98     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     98    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    9999
    100100    unconst (mParent) = aParent;
     
    128128    /* Enclose the state transition NotReady->InInit->Ready */
    129129    AutoInitSpan autoInitSpan (this);
    130     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     130    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    131131
    132132    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/GuestImpl.cpp

    r9360 r14579  
    6565    /* Enclose the state transition NotReady->InInit->Ready */
    6666    AutoInitSpan autoInitSpan (this);
    67     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     67    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6868
    6969    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/GuestOSTypeImpl.cpp

    r14437 r14579  
    8484    /* Enclose the state transition NotReady->InInit->Ready */
    8585    AutoInitSpan autoInitSpan (this);
    86     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     86    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    8787
    8888    unconst (mFamilyID) = aFamilyId;
  • trunk/src/VBox/Main/HardDisk2Impl.cpp

    r14573 r14579  
    477477    /* Enclose the state transition NotReady->InInit->Ready */
    478478    AutoInitSpan autoInitSpan (this);
    479     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     479    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    480480
    481481    HRESULT rc = S_OK;
     
    524524    /* Enclose the state transition NotReady->InInit->Ready */
    525525    AutoInitSpan autoInitSpan (this);
    526     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     526    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    527527
    528528    HRESULT rc = S_OK;
     
    584584    /* Enclose the state transition NotReady->InInit->Ready */
    585585    AutoInitSpan autoInitSpan (this);
    586     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     586    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    587587
    588588    HRESULT rc = S_OK;
  • trunk/src/VBox/Main/HardDiskAttachmentImpl.cpp

    r13580 r14579  
    5656    /* Enclose the state transition NotReady->InInit->Ready */
    5757    AutoInitSpan autoInitSpan (this);
    58     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     58    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    5959
    6060    m.hardDisk = aHD;
  • trunk/src/VBox/Main/HardDiskFormatImpl.cpp

    r14561 r14579  
    5858    /* Enclose the state transition NotReady->InInit->Ready */
    5959    AutoInitSpan autoInitSpan (this);
    60     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     60    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6161
    6262    /* The ID of the backend */
  • trunk/src/VBox/Main/HostDVDDriveImpl.cpp

    r8155 r14579  
    5858    /* Enclose the state transition NotReady->InInit->Ready */
    5959    AutoInitSpan autoInitSpan (this);
    60     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     60    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6161
    6262    unconst (mName) = aName;
  • trunk/src/VBox/Main/HostFloppyDriveImpl.cpp

    r8155 r14579  
    5858    /* Enclose the state transition NotReady->InInit->Ready */
    5959    AutoInitSpan autoInitSpan (this);
    60     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     60    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6161
    6262    unconst (mName) = aName;
  • trunk/src/VBox/Main/HostImpl.cpp

    r14527 r14579  
    159159
    160160    AutoWriteLock alock (this);
    161     ComAssertRet (!isReady(), E_UNEXPECTED);
     161    ComAssertRet (!isReady(), E_FAIL);
    162162
    163163    mParent = aParent;
  • trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp

    r13607 r14579  
    6060    /* Enclose the state transition NotReady->InInit->Ready */
    6161    AutoInitSpan autoInitSpan (this);
    62     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     62    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6363
    6464    unconst (mInterfaceName) = aInterfaceName;
  • trunk/src/VBox/Main/KeyboardImpl.cpp

    r14215 r14579  
    9191    /* Enclose the state transition NotReady->InInit->Ready */
    9292    AutoInitSpan autoInitSpan (this);
    93     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     93    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    9494
    9595    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/MachineDebuggerImpl.cpp

    r14107 r14579  
    7575
    7676    AutoWriteLock alock (this);
    77     ComAssertRet (!isReady(), E_UNEXPECTED);
     77    ComAssertRet (!isReady(), E_FAIL);
    7878
    7979    mParent = parent;
  • trunk/src/VBox/Main/MachineImpl.cpp

    r14437 r14579  
    395395    /* Enclose the state transition NotReady->InInit->Ready */
    396396    AutoInitSpan autoInitSpan (this);
    397     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     397    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    398398
    399399    HRESULT rc = S_OK;
     
    76897689    /* Enclose the state transition NotReady->InInit->Ready */
    76907690    AutoInitSpan autoInitSpan (this);
    7691     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     7691    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    76927692
    76937693    /* create the interprocess semaphore */
     
    1053110531    /* Enclose the state transition NotReady->InInit->Ready */
    1053210532    AutoInitSpan autoInitSpan (this);
    10533     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     10533    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    1053410534
    1053510535    AssertReturn (aSessionMachine->isWriteLockOnCurrentThread(), E_FAIL);
     
    1065910659    /* Enclose the state transition NotReady->InInit->Ready */
    1066010660    AutoInitSpan autoInitSpan (this);
    10661     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     10661    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    1066210662
    1066310663    /* Don't need to lock aMachine when VirtualBox is starting up */
  • trunk/src/VBox/Main/MediumImpl.cpp

    r14294 r14579  
    950950    /* Enclose the state transition NotReady->InInit->Ready */
    951951    AutoInitSpan autoInitSpan (this);
    952     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     952    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    953953
    954954    HRESULT rc = S_OK;
     
    10031003    /* Enclose the state transition NotReady->InInit->Ready */
    10041004    AutoInitSpan autoInitSpan (this);
    1005     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     1005    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    10061006
    10071007    HRESULT rc = S_OK;
  • trunk/src/VBox/Main/MouseImpl.cpp

    r13837 r14579  
    8484    /* Enclose the state transition NotReady->InInit->Ready */
    8585    AutoInitSpan autoInitSpan (this);
    86     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     86    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    8787
    8888    unconst(mParent) = parent;
  • trunk/src/VBox/Main/NetworkAdapterImpl.cpp

    r10898 r14579  
    6161    /* Enclose the state transition NotReady->InInit->Ready */
    6262    AutoInitSpan autoInitSpan (this);
    63     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     63    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6464
    6565    unconst (mParent) = aParent;
     
    103103    /* Enclose the state transition NotReady->InInit->Ready */
    104104    AutoInitSpan autoInitSpan (this);
    105     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     105    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    106106
    107107    unconst (mParent) = aParent;
     
    135135    /* Enclose the state transition NotReady->InInit->Ready */
    136136    AutoInitSpan autoInitSpan (this);
    137     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     137    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    138138
    139139    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/ParallelPortImpl.cpp

    r13580 r14579  
    5959    /* Enclose the state transition NotReady->InInit->Ready */
    6060    AutoInitSpan autoInitSpan (this);
    61     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     61    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6262
    6363    unconst (mParent) = aParent;
     
    9393    /* Enclose the state transition NotReady->InInit->Ready */
    9494    AutoInitSpan autoInitSpan (this);
    95     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     95    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    9696
    9797    unconst (mParent) = aParent;
     
    125125    /* Enclose the state transition NotReady->InInit->Ready */
    126126    AutoInitSpan autoInitSpan (this);
    127     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     127    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    128128
    129129    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/PerformanceImpl.cpp

    r13082 r14579  
    102102    /* Enclose the state transition NotReady->InInit->Ready */
    103103    AutoInitSpan autoInitSpan (this);
    104     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     104    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    105105
    106106    LogFlowThisFuncEnter();
     
    294294            filteredMetrics.push_back(*it);
    295295        }
    296        
     296
    297297    com::SafeIfaceArray<IPerformanceMetric> retMetrics (filteredMetrics.size());
    298298    int i = 0;
  • trunk/src/VBox/Main/ProgressImpl.cpp

    r13915 r14579  
    504504    /* Enclose the state transition NotReady->InInit->Ready */
    505505    AutoInitSpan autoInitSpan (this);
    506     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     506    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    507507
    508508    HRESULT rc = S_OK;
     
    555555    /* Enclose the state transition NotReady->InInit->Ready */
    556556    AutoInitSpan autoInitSpan (this);
    557     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     557    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    558558
    559559    HRESULT rc = S_OK;
     
    10951095    /* Enclose the state transition NotReady->InInit->Ready */
    10961096    AutoInitSpan autoInitSpan (this);
    1097     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     1097    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    10981098
    10991099    mProgresses.resize (2);
  • trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp

    r13659 r14579  
    6060    /* Enclose the state transition NotReady->InInit->Ready */
    6161    AutoInitSpan autoInitSpan (this);
    62     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     62    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6363
    6464    unconst (mData.id).create();
  • trunk/src/VBox/Main/SATAControllerImpl.cpp

    r10082 r14579  
    7070    /* Enclose the state transition NotReady->InInit->Ready */
    7171    AutoInitSpan autoInitSpan (this);
    72     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     72    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    7373
    7474    unconst (mParent) = aParent;
     
    104104    /* Enclose the state transition NotReady->InInit->Ready */
    105105    AutoInitSpan autoInitSpan (this);
    106     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     106    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    107107
    108108    unconst (mParent) = aParent;
     
    132132    /* Enclose the state transition NotReady->InInit->Ready */
    133133    AutoInitSpan autoInitSpan (this);
    134     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     134    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    135135
    136136    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/SerialPortImpl.cpp

    r13580 r14579  
    5959    /* Enclose the state transition NotReady->InInit->Ready */
    6060    AutoInitSpan autoInitSpan (this);
    61     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     61    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6262
    6363    unconst (mParent) = aParent;
     
    9393    /* Enclose the state transition NotReady->InInit->Ready */
    9494    AutoInitSpan autoInitSpan (this);
    95     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     95    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    9696
    9797    unconst (mParent) = aParent;
     
    125125    /* Enclose the state transition NotReady->InInit->Ready */
    126126    AutoInitSpan autoInitSpan (this);
    127     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     127    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    128128
    129129    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/SessionImpl.cpp

    r13835 r14579  
    8484    /* Enclose the state transition NotReady->InInit->Ready */
    8585    AutoInitSpan autoInitSpan (this);
    86     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     86    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    8787
    8888    LogFlowThisFuncEnter();
  • trunk/src/VBox/Main/SharedFolderImpl.cpp

    r13837 r14579  
    7171    /* Enclose the state transition NotReady->InInit->Ready */
    7272    AutoInitSpan autoInitSpan (this);
    73     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     73    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    7474
    7575    unconst (mMachine) = aMachine;
     
    100100    /* Enclose the state transition NotReady->InInit->Ready */
    101101    AutoInitSpan autoInitSpan (this);
    102     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     102    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    103103
    104104    unconst (mMachine) = aMachine;
     
    129129    /* Enclose the state transition NotReady->InInit->Ready */
    130130    AutoInitSpan autoInitSpan (this);
    131     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     131    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    132132
    133133    unconst (mConsole) = aConsole;
     
    157157    /* Enclose the state transition NotReady->InInit->Ready */
    158158    AutoInitSpan autoInitSpan (this);
    159     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     159    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    160160
    161161    unconst (mVirtualBox) = aVirtualBox;
  • trunk/src/VBox/Main/SnapshotImpl.cpp

    r13580 r14579  
    7474
    7575    AutoWriteLock alock (this);
    76     ComAssertRet (!isReady(), E_UNEXPECTED);
     76    ComAssertRet (!isReady(), E_FAIL);
    7777
    7878    mParent = aParent;
  • trunk/src/VBox/Main/SystemPropertiesImpl.cpp

    r14225 r14579  
    6969    /* Enclose the state transition NotReady->InInit->Ready */
    7070    AutoInitSpan autoInitSpan (this);
    71     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     71    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    7272
    7373    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/USBControllerImpl.cpp

    r10535 r14579  
    7575    /* Enclose the state transition NotReady->InInit->Ready */
    7676    AutoInitSpan autoInitSpan (this);
    77     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     77    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    7878
    7979    unconst (mParent) = aParent;
     
    112112    /* Enclose the state transition NotReady->InInit->Ready */
    113113    AutoInitSpan autoInitSpan (this);
    114     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     114    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    115115
    116116    unconst (mParent) = aParent;
     
    154154    /* Enclose the state transition NotReady->InInit->Ready */
    155155    AutoInitSpan autoInitSpan (this);
    156     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     156    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    157157
    158158    unconst (mParent) = aParent;
  • trunk/src/VBox/Main/USBDeviceImpl.cpp

    r13659 r14579  
    5757    /* Enclose the state transition NotReady->InInit->Ready */
    5858    AutoInitSpan autoInitSpan (this);
    59     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     59    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    6060
    6161    HRESULT hrc = aUSBDevice->COMGETTER(VendorId)(&unconst (mData.vendorId));
  • trunk/src/VBox/Main/VirtualBoxBase.cpp

    r14294 r14579  
    107107 *
    108108 * This method succeeeds (and increments the number of callers) only if the
    109  * current object's state is Ready. Otherwise, it will return E_UNEXPECTED
     109 * current object's state is Ready. Otherwise, it will return E_ACCESSDENIED
    110110 * to indicate that the object is not operational. There are two exceptions
    111111 * from this rule:
     
    141141 * @param aLimited      |true| to add a limited caller.
    142142 *
    143  * @return              S_OK on success or E_UNEXPECTED on failure.
     143 * @return              S_OK on success or E_ACCESSDENIED on failure.
    144144 *
    145145 * @note It is preferrable to use the #addLimitedCaller() rather than
     
    155155    AutoWriteLock stateLock (mStateLock);
    156156
    157     HRESULT rc = E_UNEXPECTED;
     157    HRESULT rc = E_ACCESSDENIED;
    158158
    159159    if (mState == Ready || (aLimited && mState == Limited))
     
    543543VirtualBoxBaseProto::AutoMayUninitSpan::
    544544AutoMayUninitSpan (VirtualBoxBaseProto *aObj)
    545     : mObj (aObj), mRC (E_UNEXPECTED), mAlreadyInProgress (false)
     545    : mObj (aObj), mRC (E_FAIL), mAlreadyInProgress (false)
    546546    , mAcceptUninit (false)
    547547{
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r14437 r14579  
    147147    /* Enclose the state transition NotReady->InInit->Ready */
    148148    AutoInitSpan autoInitSpan (this);
    149     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     149    AssertReturn (autoInitSpan.isOk(), E_FAIL);
    150150
    151151    LogFlow (("===========================================================\n"));
  • trunk/src/VBox/Main/include/ProgressImpl.h

    r13580 r14579  
    298298        /* Enclose the state transition NotReady->InInit->Ready */
    299299        AutoInitSpan autoInitSpan (this);
    300         AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     300        AssertReturn (autoInitSpan.isOk(), E_FAIL);
    301301
    302302        mProgresses = ProgressVector (aFirstProgress, aLastProgress);
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r13887 r14579  
    366366 *
    367367 *  When this object is not ready, the macro sets error info and returns
    368  *  E_UNEXPECTED (the translatable error message is defined in null context).
     368 *  E_ACCESSDENIED (the translatable error message is defined in null context).
    369369 *  Otherwise, the macro does nothing.
    370370 *
     
    376376    do { \
    377377        if (!isReady()) \
    378             return setError (E_UNEXPECTED, tr ("The object is not ready")); \
     378            return setError (E_ACCESSDENIED, tr ("The object is not ready")); \
    379379    } while (0)
    380380
     
    767767     * {
    768768     *     AutoInitSpan autoInitSpan (this);
    769      *     AssertReturn (autoInitSpan.isOk(), E_UNEXPECTED);
     769     *     AssertReturn (autoInitSpan.isOk(), E_FAIL);
    770770     *     ...
    771771     *     if (FAILED (rc))
     
    863863     * {
    864864     *     AutoReinitSpan autoReinitSpan (this);
    865      *     AssertReturn (autoReinitSpan.isOk(), E_UNEXPECTED);
     865     *     AssertReturn (autoReinitSpan.isOk(), E_FAIL);
    866866     *     ...
    867867     *     if (FAILED (rc))
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