Changeset 17827 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Mar 13, 2009 2:14:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp
r17361 r17827 163 163 CHECK_ERROR_BREAK(pAppliance, Read(bstrOvfFilename)); 164 164 165 RTPrintf("Interpreting %s... ", strOvfFilename.c_str()); 166 CHECK_ERROR_BREAK(pAppliance, Interpret()); 165 // call interpret(); this can yield both warnings and errors, so we need 166 // to tinker with the error info a bit 167 RTPrintf("Interpreting %s...\n", strOvfFilename.c_str()); 168 rc = pAppliance->Interpret(); 169 com::ErrorInfo info0(pAppliance); 170 171 com::SafeArray<BSTR> aWarnings; 172 if (SUCCEEDED(pAppliance->GetWarnings(ComSafeArrayAsOutParam(aWarnings)))) 173 { 174 unsigned cWarnings = aWarnings.size(); 175 for (unsigned i = 0; i < cWarnings; ++i) 176 { 177 Bstr bstrWarning(aWarnings[i]); 178 RTPrintf("WARNING: %ls.\n", bstrWarning.raw()); 179 } 180 } 181 182 if (FAILED(rc)) // during interpret, after printing warnings 183 { 184 com::GluePrintErrorInfo(info0); 185 com::GluePrintErrorContext("Interpret", __FILE__, __LINE__); 186 break; 187 } 188 167 189 RTPrintf("OK.\n"); 168 190 … … 470 492 if (fExecute) 471 493 { 494 // go! 472 495 ComPtr<IProgress> progress; 473 496 CHECK_ERROR_BREAK(pAppliance,
Note:
See TracChangeset
for help on using the changeset viewer.