VirtualBox

Ignore:
Timestamp:
Dec 4, 2008 12:10:37 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40340
Message:

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

The mega commit that implements Main-wide usage of new CheckCom*
macros, mostly CheckComArgNotNull, CheckComArgStrNotEmptyOrNull,
CheckComArgOutSafeArrayPointerValid, CheckComArgExpr.
Note that some methods incorrectly returned E_INVALIDARG where they
should have returned E_POINTER and vice versa. If any higher level
function tests these, they will behave differently now...

Special thanks to: vi macros, making it easy to semi-automatically
find and replace several hundred instances of if (!aName) ...

File:
1 edited

Legend:

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

    r14959 r14972  
    161161STDMETHODIMP AudioAdapter::COMGETTER(Enabled)(BOOL *aEnabled)
    162162{
    163     if (!aEnabled)
    164         return E_POINTER;
     163    CheckComArgOutPointerValid(aEnabled);
    165164
    166165    AutoCaller autoCaller (this);
     
    196195STDMETHODIMP AudioAdapter::COMGETTER(AudioDriver)(AudioDriverType_T *aAudioDriver)
    197196{
    198     if (!aAudioDriver)
    199         return E_POINTER;
     197    CheckComArgOutPointerValid(aAudioDriver);
    200198
    201199    AutoCaller autoCaller (this);
     
    274272STDMETHODIMP AudioAdapter::COMGETTER(AudioController)(AudioControllerType_T *aAudioController)
    275273{
    276     if (!aAudioController)
    277         return E_POINTER;
     274    CheckComArgOutPointerValid(aAudioController);
    278275
    279276    AutoCaller autoCaller (this);
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