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/HostFloppyDriveImpl.cpp

    r14772 r14972  
    9090STDMETHODIMP HostFloppyDrive::COMGETTER(Name) (BSTR *aName)
    9191{
    92     if (!aName)
    93         return E_POINTER;
     92    CheckComArgOutPointerValid(aName);
    9493
    9594    AutoCaller autoCaller (this);
     
    105104STDMETHODIMP HostFloppyDrive::COMGETTER(Description) (BSTR *aDescription)
    106105{
    107     if (!aDescription)
    108         return E_POINTER;
     106    CheckComArgOutPointerValid(aDescription);
    109107
    110108    AutoCaller autoCaller (this);
     
    120118STDMETHODIMP HostFloppyDrive::COMGETTER(Udi) (BSTR *aUdi)
    121119{
    122     if (!aUdi)
    123         return E_POINTER;
     120    CheckComArgOutPointerValid(aUdi);
    124121
    125122    AutoCaller autoCaller (this);
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