VirtualBox

Changeset 33760 in vbox


Ignore:
Timestamp:
Nov 4, 2010 11:00:40 AM (14 years ago)
Author:
vboxsync
Message:

Main/Medium: don't just randomly throw exception if a device type conversion is not possible, no one handles them.

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

Legend:

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

    r33757 r33760  
    42304230            break;
    42314231        default:
    4232             ComAssertFailedThrow(E_FAIL);
     4232            ComAssertFailedRet(VDTYPE_INVALID);
    42334233    }
    42344234
     
    42554255            break;
    42564256        default:
    4257             ComAssertFailedThrow(E_FAIL);
     4257            ComAssertFailedRet(DeviceType_Null);
    42584258    }
    42594259
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r33708 r33760  
    265265#define ComAssertComRCRetRC(rc)             \
    266266    do { ComAssertComRC(rc); if (!SUCCEEDED(rc)) return (rc); } while (0)
     267/** Special version of ComAssert that returns ret */
     268#define ComAssertFailedRet(ret)                \
     269    if (1) { ComAssertFailed(); { return (ret); } } else do {} while (0)
    267270
    268271
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