VirtualBox

Ignore:
Timestamp:
Dec 4, 2008 12:10:37 PM (16 years ago)
Author:
vboxsync
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/ParallelPortImpl.cpp

    r14772 r14972  
    323323STDMETHODIMP ParallelPort::COMGETTER(Enabled) (BOOL *aEnabled)
    324324{
    325     if (!aEnabled)
    326         return E_POINTER;
     325    CheckComArgOutPointerValid(aEnabled);
    327326
    328327    AutoCaller autoCaller (this);
     
    372371STDMETHODIMP ParallelPort::COMGETTER(Slot) (ULONG *aSlot)
    373372{
    374     if (!aSlot)
    375         return E_POINTER;
     373    CheckComArgOutPointerValid(aSlot);
    376374
    377375    AutoCaller autoCaller (this);
     
    387385STDMETHODIMP ParallelPort::COMGETTER(IRQ) (ULONG *aIRQ)
    388386{
    389     if (!aIRQ)
    390         return E_POINTER;
     387    CheckComArgOutPointerValid(aIRQ);
    391388
    392389    AutoCaller autoCaller (this);
     
    442439STDMETHODIMP ParallelPort::COMGETTER(IOBase) (ULONG *aIOBase)
    443440{
    444     if (!aIOBase)
    445         return E_POINTER;
     441    CheckComArgOutPointerValid(aIOBase);
    446442
    447443    AutoCaller autoCaller (this);
     
    497493STDMETHODIMP ParallelPort::COMGETTER(Path) (BSTR *aPath)
    498494{
    499     if (!aPath)
    500         return E_POINTER;
     495    CheckComArgOutPointerValid(aPath);
    501496
    502497    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