VirtualBox

Changeset 59586 in vbox for trunk


Ignore:
Timestamp:
Feb 4, 2016 5:41:00 PM (9 years ago)
Author:
vboxsync
Message:

Appliance::i_readImpl: Either throw errors or return them, don't do both. duh.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r59577 r59586  
    152152     * @{
    153153     */
    154     HRESULT i_readImpl(const LocationInfo &aLocInfo, ComObjPtr<Progress> &aProgress);
     154    void    i_readImpl(const LocationInfo &aLocInfo, ComObjPtr<Progress> &aProgress);
    155155
    156156    HRESULT i_readFS(TaskOVF *pTask);
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r59582 r59586  
    9191        /* Parse all necessary info out of the URI */
    9292        i_parseURI(aFile, m->locInfo);
    93         rc = i_readImpl(m->locInfo, progress);
     93        i_readImpl(m->locInfo, progress);
    9494    }
    9595    catch (HRESULT aRC)
     
    845845 * @param   aLocInfo    The OVF location.
    846846 * @param   aProgress   Where to return the progress object.
    847  * @return  COM success status code. COM error codes will be thrown.
     847 * @throws COM error codes will be thrown.
    848848 */
    849 HRESULT Appliance::i_readImpl(const LocationInfo &aLocInfo, ComObjPtr<Progress> &aProgress)
     849void Appliance::i_readImpl(const LocationInfo &aLocInfo, ComObjPtr<Progress> &aProgress)
    850850{
    851851    BstrFmt bstrDesc = BstrFmt(tr("Reading appliance '%s'"),
     
    872872
    873873    /* Initialize our worker task */
    874     TaskOVF* task = NULL;
     874    TaskOVF *task = NULL;
    875875    try
    876876    {
     
    880880    {
    881881        delete task;
    882         throw rc = setError(VBOX_E_OBJECT_NOT_FOUND,
    883                             tr("Could not create TaskOVF object for reading the OVF from disk"));
     882        throw setError(VBOX_E_OBJECT_NOT_FOUND,
     883                       tr("Could not create TaskOVF object for reading the OVF from disk"));
    884884    }
    885885
    886886    rc = task->createThread();
    887887    if (FAILED(rc)) throw rc;
    888 
    889     return rc;
    890888}
    891889
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