VirtualBox

Changeset 85281 in vbox


Ignore:
Timestamp:
Jul 12, 2020 2:44:40 PM (4 years ago)
Author:
vboxsync
Message:

Main/ApplianceImplImport.cpp: Fixed a VERR/HRESULT mixup, change all setErrorVrc/VERR_COM_OBJECT_NOT_FOUND calls to setError/VBOX_E_OBJECT_NOT_FOUND, as that was the cause of the previous mixup (seriously how difficult can this be to get right?). bugref:9790

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp

    r84532 r85281  
    936936    {
    937937        if (aLocInfo.strProvider.equals("OCI"))
    938         {
    939938            hrc = aProgress->init(mVirtualBox, static_cast<IAppliance *>(this),
    940939                                  Utf8Str(tr("Exporting VM to Cloud...")),
     
    944943                                  Utf8Str(tr("Exporting VM to Cloud...")), // aFirstOperationDescription
    945944                                  10); // ULONG ulFirstOperationWeight
    946         }
    947945        else
    948             hrc = setErrorVrc(VBOX_E_NOT_SUPPORTED,
    949                               tr("Only \"OCI\" cloud provider is supported for now. \"%s\" isn't supported."),
    950                               aLocInfo.strProvider.c_str());
     946            hrc = setError(VBOX_E_NOT_SUPPORTED,
     947                           tr("Only \"OCI\" cloud provider is supported for now. \"%s\" isn't supported."),
     948                           aLocInfo.strProvider.c_str());
    951949        if (SUCCEEDED(hrc))
    952950        {
     
    23462344    hrc = mVirtualBox->COMGETTER(CloudProviderManager)(cpm.asOutParam());
    23472345    if (FAILED(hrc))
    2348         return setErrorVrc(VERR_COM_OBJECT_NOT_FOUND, tr("%: Cloud provider manager object wasn't found"), __FUNCTION__);
     2346        return setError(VBOX_E_OBJECT_NOT_FOUND, tr("%: Cloud provider manager object wasn't found"), __FUNCTION__);
    23492347
    23502348    Utf8Str strProviderName = pTask->locInfo.strProvider;
     
    23542352
    23552353    if (FAILED(hrc))
    2356         return setErrorVrc(VERR_COM_OBJECT_NOT_FOUND, tr("%s: Cloud provider object wasn't found"), __FUNCTION__);
     2354        return setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s: Cloud provider object wasn't found"), __FUNCTION__);
    23572355
    23582356    ComPtr<IVirtualSystemDescription> vsd = m->virtualSystemDescriptions.front();
     
    23652363
    23662364    hrc = vsd->GetDescriptionByType(VirtualSystemDescriptionType_CloudProfileName,
    2367                              ComSafeArrayAsOutParam(retTypes),
    2368                              ComSafeArrayAsOutParam(aRefs),
    2369                              ComSafeArrayAsOutParam(aOvfValues),
    2370                              ComSafeArrayAsOutParam(aVBoxValues),
    2371                              ComSafeArrayAsOutParam(aExtraConfigValues));
     2365                                    ComSafeArrayAsOutParam(retTypes),
     2366                                    ComSafeArrayAsOutParam(aRefs),
     2367                                    ComSafeArrayAsOutParam(aOvfValues),
     2368                                    ComSafeArrayAsOutParam(aVBoxValues),
     2369                                    ComSafeArrayAsOutParam(aExtraConfigValues));
    23722370    if (FAILED(hrc))
    23732371        return hrc;
     
    23752373    Utf8Str profileName(aVBoxValues[0]);
    23762374    if (profileName.isEmpty())
    2377         return setErrorVrc(VBOX_E_OBJECT_NOT_FOUND, tr("%s: Cloud user profile name wasn't found"), __FUNCTION__);
     2375        return setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s: Cloud user profile name wasn't found"), __FUNCTION__);
    23782376
    23792377    hrc = cloudProvider->GetProfileByName(aVBoxValues[0], cloudProfile.asOutParam());
    23802378    if (FAILED(hrc))
    2381         return setErrorVrc(VERR_COM_OBJECT_NOT_FOUND, tr("%s: Cloud profile object wasn't found"), __FUNCTION__);
     2379        return setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s: Cloud profile object wasn't found"), __FUNCTION__);
    23822380
    23832381    ComObjPtr<ICloudClient> cloudClient;
    23842382    hrc = cloudProfile->CreateCloudClient(cloudClient.asOutParam());
    23852383    if (FAILED(hrc))
    2386         return setErrorVrc(VERR_COM_OBJECT_NOT_FOUND, tr("%s: Cloud client object wasn't found"), __FUNCTION__);
     2384        return setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s: Cloud client object wasn't found"), __FUNCTION__);
    23872385
    23882386    if (m->virtualSystemDescriptions.size() == 1)
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