VirtualBox

Changeset 33788 in vbox


Ignore:
Timestamp:
Nov 5, 2010 11:37:50 AM (14 years ago)
Author:
vboxsync
Message:

Main-OVF: one more error check; more specific error messages

File:
1 edited

Legend:

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

    r33699 r33788  
    917917        size_t cbSize = 0;
    918918        int vrc = RTSha1ReadBuf(strOvfFile.c_str(), &pvTmpBuf, &cbSize, pCallbacks, pStorage);
    919         if (RT_FAILURE(vrc))
     919        if (   RT_FAILURE(vrc)
     920            || !pvTmpBuf)
    920921            throw setError(VBOX_E_FILE_ERROR,
    921922                           tr("Could not read OVF file '%s' (%Rrc)"),
     
    13051306                             tar, &storage.pVDImageIfaces);
    13061307        if (RT_FAILURE(vrc))
    1307             throw E_FAIL;
     1308            throw setError(E_FAIL,
     1309                           tr("Internal error (%Rrc)"), vrc);
    13081310
    13091311        /* Skip the OVF file, cause this was read in IAppliance::Read already. */
    13101312        vrc = RTTarSeekNextFile(tar);
    1311         if (RT_FAILURE(vrc))
    1312             /* Better error .... no unusual error */
    1313             throw E_FAIL;
     1313        if (   RT_FAILURE(vrc)
     1314            && vrc != VERR_TAR_END_OF_FILE)
     1315            throw setError(E_FAIL,
     1316                           tr("Internal error (%Rrc)"), vrc);
    13141317
    13151318        PVDINTERFACEIO pCallbacks = pRTSha1Callbacks;
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