VirtualBox

Changeset 15827 in vbox


Ignore:
Timestamp:
Jan 7, 2009 10:22:15 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
41413
Message:

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

  • return E_FAIL when !pVM.isOk() like GetStats does.
  • Move InjectNMI() from the accessors down to the methods for consistency.
File:
1 edited

Legend:

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

    r15762 r15827  
    340340
    341341/**
    342  * Set the new patch manager enabled flag.
    343  *
    344  * @returns COM status code
    345  * @param   new patch manager enabled flag
    346  */
    347 STDMETHODIMP MachineDebugger::InjectNMI()
    348 {
    349     LogFlowThisFunc ((""));
    350 
    351     AutoCaller autoCaller (this);
    352     CheckComRCReturnRC (autoCaller.rc());
    353 
    354     AutoWriteLock alock (this);
    355 
    356     Console::SafeVMPtr pVM (mParent);
    357     CheckComRCReturnRC (pVM.rc());
    358 
    359     HWACCMR3InjectNMI(pVM);
    360 
    361     return S_OK;
    362 }
    363 
    364 /**
    365342 * Returns the current code scanner enabled flag.
    366343 *
     
    694671    Console::SafeVMPtrQuiet pVM (mParent);
    695672
    696     if (pVM.isOk())
    697         STAMR3Reset (pVM, Utf8Str (aPattern).raw());
     673    if (!pVM.isOk())
     674        return E_FAIL;
     675
     676    STAMR3Reset (pVM, Utf8Str (aPattern).raw());
    698677
    699678    return S_OK;
     
    710689    Console::SafeVMPtrQuiet pVM (mParent);
    711690
    712     if (pVM.isOk())
    713         STAMR3Dump (pVM, Utf8Str (aPattern).raw());
     691    if (!pVM.isOk())
     692        return E_FAIL;
     693
     694    STAMR3Dump (pVM, Utf8Str (aPattern).raw());
    714695
    715696    return S_OK;
     
    742723     * of the amount statistics in a debug build. */
    743724    Bstr (pszSnapshot).cloneTo (aStats);
     725
     726    return S_OK;
     727}
     728
     729/**
     730 * Set the new patch manager enabled flag.
     731 *
     732 * @returns COM status code
     733 * @param   new patch manager enabled flag
     734 */
     735STDMETHODIMP MachineDebugger::InjectNMI()
     736{
     737    LogFlowThisFunc ((""));
     738
     739    AutoCaller autoCaller (this);
     740    CheckComRCReturnRC (autoCaller.rc());
     741
     742    AutoWriteLock alock (this);
     743
     744    Console::SafeVMPtr pVM (mParent);
     745    CheckComRCReturnRC (pVM.rc());
     746
     747    HWACCMR3InjectNMI(pVM);
    744748
    745749    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette