Changeset 91503 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 1, 2021 8:57:59 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147192
- Location:
- trunk/src/VBox/Main
- Files:
-
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r84857 r91503 1278 1278 int waitForEvent(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, VBoxEventType_T *pType, IEvent **ppEvent); 1279 1279 1280 #ifndef VBOX_GUESTCTRL_TEST_CASE1281 HRESULT setErrorExternal(VirtualBoxBase *pInterface, const Utf8Str &strAction, const GuestErrorInfo &guestErrorInfo);1282 #endif1283 1284 1280 public: 1285 1281 -
trunk/src/VBox/Main/include/VirtualBoxBase.h
r91373 r91503 174 174 AssertMsgFailed(("%s\n", #expr)); \ 175 175 setError(E_FAIL, \ 176 "Assertion failed: [%s] at '%s' (%d) in %s.\nPlease contact the product vendor!", \176 VirtualBoxBase::tr("Assertion failed: [%s] at '%s' (%d) in %s.\nPlease contact the product vendor!"), \ 177 177 #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ 178 178 } \ … … 194 194 AssertFailed(); \ 195 195 setError(E_FAIL, \ 196 "Assertion failed: at '%s' (%d) in %s.\nPlease contact the product vendor!", \196 VirtualBoxBase::tr("Assertion failed: at '%s' (%d) in %s.\nPlease contact the product vendor!"), \ 197 197 __FILE__, __LINE__, __PRETTY_FUNCTION__); \ 198 198 } while (0) … … 216 216 AssertMsgFailed(("%s\n", MyAssertMsg.c_str())); \ 217 217 setError(E_FAIL, \ 218 "Assertion failed: [%s] at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!", \218 VirtualBoxBase::tr("Assertion failed: [%s] at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!"), \ 219 219 #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__, MyAssertMsg.c_str()); \ 220 220 } \ … … 234 234 AssertMsgFailed(("%s\n", MyAssertMsg.c_str())); \ 235 235 setError(E_FAIL, \ 236 "Assertion failed: at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!", \236 VirtualBoxBase::tr("Assertion failed: at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!"), \ 237 237 __FILE__, __LINE__, __PRETTY_FUNCTION__, MyAssertMsg.c_str()); \ 238 238 } while (0) -
trunk/src/VBox/Main/src-all/AutoCaller.cpp
r85929 r91503 23 23 #include "LoggingNew.h" 24 24 25 #include "VBoxNls.h" 26 27 28 DECLARE_TRANSLATION_CONTEXT(AutoCallerCtx); 25 29 26 30 //////////////////////////////////////////////////////////////////////////////// … … 201 205 { 202 206 if (mState == Limited) 203 rc = mObj->setError(rc, "The object functionality is limited");207 rc = mObj->setError(rc, AutoCallerCtx::tr("The object functionality is limited")); 204 208 else if (FAILED(mFailedRC) && mFailedRC != E_ACCESSDENIED) 205 209 { … … 210 214 } 211 215 else 212 rc = mObj->setError(rc, "The object is not ready");216 rc = mObj->setError(rc, AutoCallerCtx::tr("The object is not ready")); 213 217 } 214 218 -
trunk/src/VBox/Main/src-all/EventImpl.cpp
r85300 r91503 1299 1299 STDMETHOD(HandleEvent)(IEvent *) 1300 1300 { 1301 ComAssertMsgRet(false, ( "HandleEvent() of wrapper shall never be called"),1301 ComAssertMsgRet(false, (tr("HandleEvent() of wrapper shall never be called")), 1302 1302 E_FAIL); 1303 1303 } … … 1443 1443 1444 1444 HRESULT rc = listener.createObject(); 1445 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create wrapper object (%Rhrc)", rc),1445 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create wrapper object (%Rhrc)"), rc), 1446 1446 E_FAIL); 1447 1447 listener.queryInterfaceTo(aListener.asOutParam()); … … 1455 1455 1456 1456 HRESULT rc = agg.createObject(); 1457 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create aggregator (%Rhrc)", rc),1457 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create aggregator (%Rhrc)"), rc), 1458 1458 E_FAIL); 1459 1459 … … 1474 1474 1475 1475 rc = mSource.createObject(); 1476 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create source (%Rhrc)", rc),1476 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create source (%Rhrc)"), rc), 1477 1477 E_FAIL); 1478 1478 rc = mSource->init(); 1479 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not init source (%Rhrc)", rc),1479 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not init source (%Rhrc)"), rc), 1480 1480 E_FAIL); 1481 1481 … … 1613 1613 1614 1614 HRESULT rc = proxy.createObject(); 1615 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create proxy (%Rhrc)", rc),1615 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create proxy (%Rhrc)"), rc), 1616 1616 E_FAIL); 1617 1617 -
trunk/src/VBox/Main/src-all/Global.cpp
r91470 r91503 24 24 #include <iprt/errcore.h> 25 25 26 #include "VBoxNls.h" 27 28 DECLARE_TRANSLATION_CONTEXT(GlobalCtx); 29 30 26 31 /* static */ 27 32 const Global::OSType Global::sOSTypes[] = … … 581 586 switch (aState) 582 587 { 583 case MachineState_Null: return "Null";584 case MachineState_PoweredOff: return "PoweredOff";585 case MachineState_Saved: return "Saved";586 case MachineState_Teleported: return "Teleported";587 case MachineState_Aborted: return "Aborted";588 case MachineState_AbortedSaved: return "Aborted-Saved";589 case MachineState_Running: return "Running";590 case MachineState_Paused: return "Paused";591 case MachineState_Stuck: return "GuruMeditation";592 case MachineState_Teleporting: return "Teleporting";593 case MachineState_LiveSnapshotting: return "LiveSnapshotting";594 case MachineState_Starting: return "Starting";595 case MachineState_Stopping: return "Stopping";596 case MachineState_Saving: return "Saving";597 case MachineState_Restoring: return "Restoring";598 case MachineState_TeleportingPausedVM: return "TeleportingPausedVM";599 case MachineState_TeleportingIn: return "TeleportingIn";600 case MachineState_DeletingSnapshotOnline: return "DeletingSnapshotOnline";601 case MachineState_DeletingSnapshotPaused: return "DeletingSnapshotPaused";602 case MachineState_OnlineSnapshotting: return "OnlineSnapshotting";603 case MachineState_RestoringSnapshot: return "RestoringSnapshot";604 case MachineState_DeletingSnapshot: return "DeletingSnapshot";605 case MachineState_SettingUp: return "SettingUp";606 case MachineState_Snapshotting: return "Snapshotting";588 case MachineState_Null: return GlobalCtx::tr("Null"); 589 case MachineState_PoweredOff: return GlobalCtx::tr("PoweredOff"); 590 case MachineState_Saved: return GlobalCtx::tr("Saved"); 591 case MachineState_Teleported: return GlobalCtx::tr("Teleported"); 592 case MachineState_Aborted: return GlobalCtx::tr("Aborted"); 593 case MachineState_AbortedSaved: return GlobalCtx::tr("Aborted-Saved"); 594 case MachineState_Running: return GlobalCtx::tr("Running"); 595 case MachineState_Paused: return GlobalCtx::tr("Paused"); 596 case MachineState_Stuck: return GlobalCtx::tr("GuruMeditation"); 597 case MachineState_Teleporting: return GlobalCtx::tr("Teleporting"); 598 case MachineState_LiveSnapshotting: return GlobalCtx::tr("LiveSnapshotting"); 599 case MachineState_Starting: return GlobalCtx::tr("Starting"); 600 case MachineState_Stopping: return GlobalCtx::tr("Stopping"); 601 case MachineState_Saving: return GlobalCtx::tr("Saving"); 602 case MachineState_Restoring: return GlobalCtx::tr("Restoring"); 603 case MachineState_TeleportingPausedVM: return GlobalCtx::tr("TeleportingPausedVM"); 604 case MachineState_TeleportingIn: return GlobalCtx::tr("TeleportingIn"); 605 case MachineState_DeletingSnapshotOnline: return GlobalCtx::tr("DeletingSnapshotOnline"); 606 case MachineState_DeletingSnapshotPaused: return GlobalCtx::tr("DeletingSnapshotPaused"); 607 case MachineState_OnlineSnapshotting: return GlobalCtx::tr("OnlineSnapshotting"); 608 case MachineState_RestoringSnapshot: return GlobalCtx::tr("RestoringSnapshot"); 609 case MachineState_DeletingSnapshot: return GlobalCtx::tr("DeletingSnapshot"); 610 case MachineState_SettingUp: return GlobalCtx::tr("SettingUp"); 611 case MachineState_Snapshotting: return GlobalCtx::tr("Snapshotting"); 607 612 default: 608 613 { 609 614 AssertMsgFailed(("%d (%#x)\n", aState, aState)); 610 615 static char s_szMsg[48]; 611 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "InvalidState-0x%08x\n", aState);616 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("InvalidState-0x%08x\n"), aState); 612 617 return s_szMsg; 613 618 } … … 620 625 switch (aState) 621 626 { 622 case SessionState_Null: return "Null";623 case SessionState_Unlocked: return "Unlocked";624 case SessionState_Locked: return "Locked";625 case SessionState_Spawning: return "Spawning";626 case SessionState_Unlocking: return "Unlocking";627 case SessionState_Null: return GlobalCtx::tr("Null"); 628 case SessionState_Unlocked: return GlobalCtx::tr("Unlocked"); 629 case SessionState_Locked: return GlobalCtx::tr("Locked"); 630 case SessionState_Spawning: return GlobalCtx::tr("Spawning"); 631 case SessionState_Unlocking: return GlobalCtx::tr("Unlocking"); 627 632 default: 628 633 { 629 634 AssertMsgFailed(("%d (%#x)\n", aState, aState)); 630 635 static char s_szMsg[48]; 631 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "InvalidState-0x%08x\n", aState);636 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("InvalidState-0x%08x\n"), aState); 632 637 return s_szMsg; 633 638 } … … 640 645 switch (aType) 641 646 { 642 case DeviceType_Null: return "Null";643 case DeviceType_Floppy: return "Floppy";644 case DeviceType_DVD: return "DVD";645 case DeviceType_HardDisk: return "HardDisk";646 case DeviceType_Network: return "Network";647 case DeviceType_USB: return "USB";648 case DeviceType_SharedFolder: return "ShardFolder";647 case DeviceType_Null: return GlobalCtx::tr("Null"); 648 case DeviceType_Floppy: return GlobalCtx::tr("Floppy"); 649 case DeviceType_DVD: return GlobalCtx::tr("DVD"); 650 case DeviceType_HardDisk: return GlobalCtx::tr("HardDisk"); 651 case DeviceType_Network: return GlobalCtx::tr("Network"); 652 case DeviceType_USB: return GlobalCtx::tr("USB"); 653 case DeviceType_SharedFolder: return GlobalCtx::tr("ShardFolder"); 649 654 default: 650 655 { 651 656 AssertMsgFailed(("%d (%#x)\n", aType, aType)); 652 657 static char s_szMsg[48]; 653 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "InvalidType-0x%08x\n", aType);658 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("InvalidType-0x%08x\n"), aType); 654 659 return s_szMsg; 655 660 } … … 663 668 switch (aReason) 664 669 { 665 case Reason_Unspecified: return "unspecified";666 case Reason_HostSuspend: return "host suspend";667 case Reason_HostResume: return "host resume";668 case Reason_HostBatteryLow: return "host battery low";669 case Reason_Snapshot: return "snapshot";670 case Reason_Unspecified: return GlobalCtx::tr("unspecified"); 671 case Reason_HostSuspend: return GlobalCtx::tr("host suspend"); 672 case Reason_HostResume: return GlobalCtx::tr("host resume"); 673 case Reason_HostBatteryLow: return GlobalCtx::tr("host battery low"); 674 case Reason_Snapshot: return GlobalCtx::tr("snapshot"); 670 675 default: 671 676 { 672 677 AssertMsgFailed(("%d (%#x)\n", aReason, aReason)); 673 678 static char s_szMsg[48]; 674 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "invalid reason %#010x\n", aReason);679 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("invalid reason %#010x\n"), aReason); 675 680 return s_szMsg; 676 681 } -
trunk/src/VBox/Main/src-all/TextScript.cpp
r90828 r91503 194 194 HRESULT GeneralTextScript::parse() 195 195 { 196 // AssertReturn(!mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, "parse called more than once"));196 // AssertReturn(!mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("parse called more than once"))); 197 197 198 198 /* … … 215 215 HRESULT GeneralTextScript::saveToString(Utf8Str &rStrDst) 216 216 { 217 AssertReturn(mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, "saveToString() called before parse()"));217 AssertReturn(mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("saveToString() called before parse()"))); 218 218 219 219 /* … … 264 264 { 265 265 AssertReturn(idxLine < mScriptContentByLines.size(), 266 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, "attempting to set line %zu when there are only %zu lines",266 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("attempting to set line %zu when there are only %zu lines"), 267 267 idxLine, mScriptContentByLines.size())); 268 268 try … … 293 293 AssertReturn(idxLine < mScriptContentByLines.size(), 294 294 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, 295 "attempting search&replace in line %zu when there are only %zu lines",295 tr("attempting search&replace in line %zu when there are only %zu lines"), 296 296 idxLine, mScriptContentByLines.size())); 297 297 … … 320 320 { 321 321 AssertReturn(idxLine < mScriptContentByLines.size(), 322 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, "appending to line %zu when there are only %zu lines",322 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("appending to line %zu when there are only %zu lines"), 323 323 idxLine, mScriptContentByLines.size())); 324 324 … … 337 337 { 338 338 AssertReturn(idxLine < mScriptContentByLines.size(), 339 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, "prepending to line %zu when there are only %zu lines",339 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("prepending to line %zu when there are only %zu lines"), 340 340 idxLine, mScriptContentByLines.size())); 341 341 -
trunk/src/VBox/Main/src-all/VirtualBoxBase.cpp
r91373 r91503 231 231 true /* aLogIt */, 232 232 0 /* aResultDetail */, 233 tr("%s.\n%s[%d] (%s)"),233 "%s.\n%s[%d] (%s)", 234 234 err.what(), pszFile, iLine, pszFunction); 235 235 } … … 346 346 switch (aResultCode) 347 347 { 348 case E_INVALIDARG: strText = "A parameter has an invalid value"; break;349 case E_POINTER: strText = "A parameter is an invalid pointer"; break;350 case E_UNEXPECTED: strText = "The result of the operation is unexpected"; break;351 case E_ACCESSDENIED: strText = "The access to an object is not allowed"; break;352 case E_OUTOFMEMORY: strText = "The allocation of new memory failed"; break;353 case E_NOTIMPL: strText = "The requested operation is not implemented"; break;354 case E_NOINTERFACE: strText = "The requested interface is not implemented"; break;355 case E_FAIL: strText = "A general error occurred"; break;356 case E_ABORT: strText = "The operation was canceled"; break;357 case VBOX_E_OBJECT_NOT_FOUND: strText = "Object corresponding to the supplied arguments does not exist"; break;358 case VBOX_E_INVALID_VM_STATE: strText = "Current virtual machine state prevents the operation"; break;359 case VBOX_E_VM_ERROR: strText = "Virtual machine error occurred attempting the operation"; break;360 case VBOX_E_FILE_ERROR: strText = "File not accessible or erroneous file contents"; break;361 case VBOX_E_IPRT_ERROR: strText = "Runtime subsystem error"; break;362 case VBOX_E_PDM_ERROR: strText = "Pluggable Device Manager error"; break;363 case VBOX_E_INVALID_OBJECT_STATE: strText = "Current object state prohibits operation"; break;364 case VBOX_E_HOST_ERROR: strText = "Host operating system related error"; break;365 case VBOX_E_NOT_SUPPORTED: strText = "Requested operation is not supported"; break;366 case VBOX_E_XML_ERROR: strText = "Invalid XML found"; break;367 case VBOX_E_INVALID_SESSION_STATE: strText = "Current session state prohibits operation"; break;368 case VBOX_E_OBJECT_IN_USE: strText = "Object being in use prohibits operation"; break;369 case VBOX_E_PASSWORD_INCORRECT: strText = "Incorrect password provided"; break;370 default: strText = "Unknown error"; break;348 case E_INVALIDARG: strText = tr("A parameter has an invalid value"); break; 349 case E_POINTER: strText = tr("A parameter is an invalid pointer"); break; 350 case E_UNEXPECTED: strText = tr("The result of the operation is unexpected"); break; 351 case E_ACCESSDENIED: strText = tr("The access to an object is not allowed"); break; 352 case E_OUTOFMEMORY: strText = tr("The allocation of new memory failed"); break; 353 case E_NOTIMPL: strText = tr("The requested operation is not implemented"); break; 354 case E_NOINTERFACE: strText = tr("The requested interface is not implemented"); break; 355 case E_FAIL: strText = tr("A general error occurred"); break; 356 case E_ABORT: strText = tr("The operation was canceled"); break; 357 case VBOX_E_OBJECT_NOT_FOUND: strText = tr("Object corresponding to the supplied arguments does not exist"); break; 358 case VBOX_E_INVALID_VM_STATE: strText = tr("Current virtual machine state prevents the operation"); break; 359 case VBOX_E_VM_ERROR: strText = tr("Virtual machine error occurred attempting the operation"); break; 360 case VBOX_E_FILE_ERROR: strText = tr("File not accessible or erroneous file contents"); break; 361 case VBOX_E_IPRT_ERROR: strText = tr("Runtime subsystem error"); break; 362 case VBOX_E_PDM_ERROR: strText = tr("Pluggable Device Manager error"); break; 363 case VBOX_E_INVALID_OBJECT_STATE: strText = tr("Current object state prohibits operation"); break; 364 case VBOX_E_HOST_ERROR: strText = tr("Host operating system related error"); break; 365 case VBOX_E_NOT_SUPPORTED: strText = tr("Requested operation is not supported"); break; 366 case VBOX_E_XML_ERROR: strText = tr("Invalid XML found"); break; 367 case VBOX_E_INVALID_SESSION_STATE: strText = tr("Current session state prohibits operation"); break; 368 case VBOX_E_OBJECT_IN_USE: strText = tr("Object being in use prohibits operation"); break; 369 case VBOX_E_PASSWORD_INCORRECT: strText = tr("Incorrect password provided"); break; 370 default: strText = tr("Unknown error"); break; 371 371 } 372 372 } -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r91430 r91503 2226 2226 if (!pTask->isOk()) 2227 2227 { 2228 hrc = setError(FAILED(pTask->rc()) ? pTask->rc() : E_FAIL, "Could not create VMPowerDownTask object\n");2228 hrc = setError(FAILED(pTask->rc()) ? pTask->rc() : E_FAIL, tr("Could not create VMPowerDownTask object\n")); 2229 2229 delete(pTask); 2230 2230 pTask = NULL; … … 3395 3395 true /*aLogIt*/, 3396 3396 0 /* aResultDetail */, 3397 "Invalid state '%s' for changing medium",3397 tr("Invalid state '%s' for changing medium"), 3398 3398 VMR3GetStateName(enmVMState)); 3399 3399 } … … 5508 5508 * Not fatal if we start the VM, fatal if the VM is already running. */ 5509 5509 LogRel(("VRDE: VirtualBox Remote Desktop Extension is not available.\n")); 5510 errMsg = Utf8Str( "VirtualBox Remote Desktop Extension is not available");5510 errMsg = Utf8Str(tr("VirtualBox Remote Desktop Extension is not available")); 5511 5511 } 5512 5512 else if (RT_FAILURE(vrc)) … … 6451 6451 6452 6452 if (RT_FAILURE(vrc)) 6453 return setErrorBoth(E_FAIL, vrc, tr("%Rrc"), vrc);6453 return setErrorBoth(E_FAIL, vrc, "%Rrc", vrc); 6454 6454 if (FAILED(rc)) 6455 6455 return rc; … … 6497 6497 6498 6498 if (RT_FAILURE(vrc)) 6499 return setErrorBoth(E_FAIL, vrc, tr("%Rrc"), vrc);6499 return setErrorBoth(E_FAIL, vrc, "%Rrc", vrc); 6500 6500 if (FAILED(rc)) 6501 6501 return rc; … … 6579 6579 pAttachment, mMachineState, &rc); 6580 6580 if (RT_FAILURE(vrc)) 6581 throw setErrorBoth(E_FAIL, vrc, tr("%Rrc"), vrc);6581 throw setErrorBoth(E_FAIL, vrc, "%Rrc", vrc); 6582 6582 if (FAILED(rc)) 6583 6583 throw rc; -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r91416 r91503 275 275 int vrc, 276 276 const char *pcszName) 277 : RTCError(Utf8StrFmt( "%s failed: rc=%Rrc, pcszName=%s", pcszFunction, vrc, pcszName)),277 : RTCError(Utf8StrFmt(Console::tr("%s failed: rc=%Rrc, pcszName=%s"), pcszFunction, vrc, pcszName)), 278 278 m_vrc(vrc) 279 279 { … … 5072 5072 hrc = ptrMedium->COMGETTER(Location)(loc.asOutParam()); H(); 5073 5073 i_atVMRuntimeErrorCallbackF(0, "DvdOrFloppyImageInaccessible", 5074 "The image file '%ls' is inaccessible and is being ignored. "5075 "Please select a different image file for the virtual %s drive.",5074 N_("The image file '%ls' is inaccessible and is being ignored. " 5075 "Please select a different image file for the virtual %s drive."), 5076 5076 loc.raw(), 5077 5077 enmType == DeviceType_DVD ? "DVD" : "floppy"); -
trunk/src/VBox/Main/src-client/ConsoleImplTeleporter.cpp
r82968 r91503 708 708 return hrc; 709 709 } 710 return setErrorBoth(E_FAIL, vrc, tr("VMR3Teleport -> %Rrc"), vrc);710 return setErrorBoth(E_FAIL, vrc, "VMR3Teleport -> %Rrc", vrc); 711 711 } 712 712 … … 1017 1017 ptrProgress->i_setCancelCallback(NULL, NULL); 1018 1018 delete pState; 1019 hrc = setErrorBoth(E_FAIL, vrc, tr("RTThreadCreate -> %Rrc"), vrc);1019 hrc = setErrorBoth(E_FAIL, vrc, "RTThreadCreate -> %Rrc", vrc); 1020 1020 } 1021 1021 -
trunk/src/VBox/Main/src-client/EmulatedUSBImpl.cpp
r82968 r91503 213 213 { 214 214 LogFlowThisFunc(("%Rrc\n", vrc)); 215 hrc = pConsole->setErrorBoth(VBOX_E_IPRT_ERROR, vrc, "Init emulated USB webcam (%Rrc)", vrc);215 hrc = pConsole->setErrorBoth(VBOX_E_IPRT_ERROR, vrc, EmulatedUSB::tr("Init emulated USB webcam (%Rrc)"), vrc); 216 216 } 217 217 … … 312 312 { 313 313 LogFlowThisFunc(("%Rrc\n", vrc)); 314 hrc = pConsole->setErrorBoth(VBOX_E_VM_ERROR, vrc, "Attach emulated USB webcam (%Rrc)", vrc);314 hrc = pConsole->setErrorBoth(VBOX_E_VM_ERROR, vrc, EmulatedUSB::tr("Attach emulated USB webcam (%Rrc)"), vrc); 315 315 } 316 316 … … 330 330 { 331 331 LogFlowThisFunc(("%Rrc\n", vrc)); 332 hrc = pConsole->setErrorBoth(VBOX_E_VM_ERROR, vrc, "Detach emulated USB webcam (%Rrc)", vrc);332 hrc = pConsole->setErrorBoth(VBOX_E_VM_ERROR, vrc, EmulatedUSB::tr("Detach emulated USB webcam (%Rrc)"), vrc); 333 333 } 334 334 -
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r85300 r91503 520 520 */ 521 521 GuestSessionStartupInfo startupInfo; 522 startupInfo.mName = strAction + " guest";522 startupInfo.mName = (fFlags & GuestShutdownFlag_Reboot) ? tr("Rebooting guest") : tr("Shutting down guest"); 523 523 524 524 GuestCredentials guestCreds; -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r84857 r91503 1379 1379 } 1380 1380 1381 /**1382 * Sets a guest error as error info, needed for API clients.1383 *1384 * @returns HRESULT COM error.1385 * @param pInterface Interface to set error for.1386 * @param strAction What action was involved causing this error.1387 * @param guestErrorInfo Guest error info to use.1388 */1389 /* static */ HRESULT GuestBase::setErrorExternal(VirtualBoxBase *pInterface,1390 const Utf8Str &strAction, const GuestErrorInfo &guestErrorInfo)1391 {1392 AssertPtrReturn(pInterface, E_POINTER);1393 return pInterface->setErrorBoth(VBOX_E_IPRT_ERROR,1394 guestErrorInfo.getRc(),1395 "%s", Utf8StrFmt("%s: %s", strAction.c_str(), GuestBase::getErrorAsString(guestErrorInfo).c_str()).c_str());1396 }1397 1381 #endif /* VBOX_GUESTCTRL_TEST_CASE */ 1398 1382 -
trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
r84865 r91503 249 249 char szDefine[80]; 250 250 RTErrQueryDefine(rcGuest, szDefine, sizeof(szDefine), false /*fFailIfUnknown*/); 251 strErr = Utf8StrFmt( "Error %s for guest directory \"%s\" occurred\n", szDefine, pcszWhat);251 strErr = Utf8StrFmt(tr("Error %s for guest directory \"%s\" occurred\n"), szDefine, pcszWhat); 252 252 break; 253 253 } … … 414 414 { 415 415 case VERR_GSTCTL_GUEST_ERROR: 416 hr = setErrorExternal(this, tr("Closing guest directory failed"), 417 GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, mData.mOpenInfo.mPath.c_str())); 418 break; 419 416 { 417 GuestErrorInfo ge(GuestErrorInfo::Type_Directory, rcGuest, mData.mOpenInfo.mPath.c_str()); 418 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Closing guest directory failed: %s"), 419 GuestBase::getErrorAsString(ge).c_str()); 420 break; 421 } 420 422 case VERR_NOT_SUPPORTED: 421 423 /* Silently skip old Guest Additions which do not support killing the … … 455 457 { 456 458 case VERR_GSTCTL_GUEST_ERROR: 457 hr = setErrorExternal(this, tr("Reading guest directory failed"), 458 GuestErrorInfo(GuestErrorInfo::Type_ToolLs, rcGuest, mData.mOpenInfo.mPath.c_str())); 459 break; 460 459 { 460 GuestErrorInfo ge(GuestErrorInfo::Type_ToolLs, rcGuest, mData.mOpenInfo.mPath.c_str()); 461 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Reading guest directory failed: %s"), 462 GuestBase::getErrorAsString(ge).c_str()); 463 break; 464 } 461 465 case VERR_GSTCTL_PROCESS_EXIT_CODE: 462 466 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading guest directory \"%s\" failed: %Rrc"), -
trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
r85307 r91503 1388 1388 { 1389 1389 if (vrc == VERR_GSTCTL_GUEST_ERROR) 1390 return setErrorExternal(this, tr("Closing guest file failed"), 1391 GuestErrorInfo(GuestErrorInfo::Type_File, rcGuest, mData.mOpenInfo.mFilename.c_str())); 1390 { 1391 GuestErrorInfo ge(GuestErrorInfo::Type_File, rcGuest, mData.mOpenInfo.mFilename.c_str()); 1392 return setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Closing guest file failed: %s"), 1393 GuestBase::getErrorAsString(ge).c_str()); 1394 } 1392 1395 return setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Closing guest file \"%s\" failed with %Rrc\n"), 1393 1396 mData.mOpenInfo.mFilename.c_str(), vrc); … … 1428 1431 { 1429 1432 if (GuestProcess::i_isGuestError(vrc)) 1430 hr = setErrorExternal(this, tr("Querying guest file information failed"), 1431 GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, mData.mOpenInfo.mFilename.c_str())); 1433 { 1434 GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, rcGuest, mData.mOpenInfo.mFilename.c_str()); 1435 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying guest file information failed: %s"), 1436 GuestBase::getErrorAsString(ge).c_str()); 1437 } 1432 1438 else 1433 1439 hr = setErrorVrc(vrc, … … 1458 1464 { 1459 1465 if (GuestProcess::i_isGuestError(vrc)) 1460 hr = setErrorExternal(this, tr("Querying guest file size failed"), 1461 GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, mData.mOpenInfo.mFilename.c_str())); 1466 { 1467 GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, rcGuest, mData.mOpenInfo.mFilename.c_str()); 1468 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying guest file size failed: %s"), 1469 GuestBase::getErrorAsString(ge).c_str()); 1470 } 1462 1471 else 1463 1472 hr = setErrorVrc(vrc, tr("Querying guest file size for \"%s\" failed: %Rrc"), mData.mOpenInfo.mFilename.c_str(), vrc); -
trunk/src/VBox/Main/src-client/GuestImpl.cpp
r85309 r91503 633 633 { 634 634 vrc = RTTimerLRCreate(&mStatTimer, aStatisticsUpdateInterval * RT_MS_1SEC, &Guest::i_staticUpdateStats, this); 635 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, "Failed to create guest statistics update timer (%Rrc)", vrc));635 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, tr("Failed to create guest statistics update timer (%Rrc)"), vrc)); 636 636 } 637 637 else if (aStatisticsUpdateInterval != mStatUpdateInterval) 638 638 { 639 639 vrc = RTTimerLRChangeInterval(mStatTimer, aStatisticsUpdateInterval * RT_NS_1SEC_64); 640 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, "Failed to change guest statistics update timer interval from %u to %u failed (%Rrc)",640 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, tr("Failed to change guest statistics update timer interval from %u to %u failed (%Rrc)"), 641 641 mStatUpdateInterval, aStatisticsUpdateInterval, vrc)); 642 642 if (mStatUpdateInterval == 0) 643 643 { 644 644 vrc = RTTimerLRStart(mStatTimer, 0); 645 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, "Failed to start the guest statistics update timer (%Rrc)", vrc));645 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, tr("Failed to start the guest statistics update timer (%Rrc)"), vrc)); 646 646 } 647 647 } … … 651 651 { 652 652 vrc = RTTimerLRStop(mStatTimer); 653 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, "Failed to stop the guest statistics update timer (%Rrc)", vrc));653 AssertRCStmt(vrc, hrc = setErrorVrc(vrc, tr("Failed to stop the guest statistics update timer (%Rrc)"), vrc)); 654 654 } 655 655 -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r90828 r91503 1785 1785 { 1786 1786 case VERR_GSTCTL_GUEST_ERROR: 1787 hr = setErrorExternal(this, Utf8StrFmt("Reading %RU32 bytes from guest process handle %RU32 failed", aToRead, aHandle), 1788 GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str())); 1789 break; 1790 1787 { 1788 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()); 1789 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Reading %RU32 bytes from guest process handle %RU32 failed: %s"), 1790 aToRead, aHandle, GuestBase::getErrorAsString(ge).c_str()); 1791 break; 1792 } 1791 1793 default: 1792 1794 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading from guest process \"%s\" (PID %RU32) failed: %Rrc"), … … 1817 1819 switch (vrc) 1818 1820 { 1819 case VERR_GSTCTL_GUEST_ERROR: 1820 hr = setErrorExternal(this, "Terminating guest process failed", 1821 GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str())); 1822 break; 1823 1821 case VERR_GSTCTL_GUEST_ERROR: 1822 { 1823 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()); 1824 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Terminating guest process failed: %s"), 1825 GuestBase::getErrorAsString(ge).c_str()); 1826 break; 1827 } 1824 1828 case VERR_NOT_SUPPORTED: 1825 1829 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, … … 1877 1881 { 1878 1882 case VERR_GSTCTL_GUEST_ERROR: 1879 hr = setErrorExternal(this, Utf8StrFmt("Waiting for guest process (flags %#x) failed", aWaitFor), 1880 GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str())); 1881 break; 1882 1883 { 1884 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()); 1885 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Waiting for guest process (flags %#x) failed: %s"), 1886 aWaitFor, GuestBase::getErrorAsString(ge).c_str()); 1887 break; 1888 } 1883 1889 case VERR_TIMEOUT: 1884 1890 *aReason = ProcessWaitResult_Timeout; … … 1931 1937 { 1932 1938 case VERR_GSTCTL_GUEST_ERROR: 1933 hr = setErrorExternal(this, Utf8StrFmt("Writing %RU32 bytes (flags %#x) to guest process failed", cbData, aFlags), 1934 GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str())); 1935 break; 1936 1939 { 1940 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()); 1941 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Writing %RU32 bytes (flags %#x) to guest process failed: %s"), 1942 cbData, aFlags, GuestBase::getErrorAsString(ge).c_str()); 1943 break; 1944 } 1937 1945 default: 1938 1946 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing to guest process \"%s\" (PID %RU32) failed: %Rrc"), -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r85300 r91503 2790 2790 */ 2791 2791 if (mData.mProtocolVersion < 2) 2792 LogRelMax(3, ( tr("Warning: Guest Additions v%u.%u.%u only supports the older guest control protocol version %u.\n"2793 " Please upgrade GAs to the current version to get full guest control capabilities.\n"),2792 LogRelMax(3, ("Warning: Guest Additions v%u.%u.%u only supports the older guest control protocol version %u.\n" 2793 " Please upgrade GAs to the current version to get full guest control capabilities.\n", 2794 2794 VBOX_FULL_VERSION_GET_MAJOR(uGaVersion), VBOX_FULL_VERSION_GET_MINOR(uGaVersion), 2795 2795 VBOX_FULL_VERSION_GET_BUILD(uGaVersion), mData.mProtocolVersion)); … … 3063 3063 { 3064 3064 if (vrc == VERR_GSTCTL_GUEST_ERROR) 3065 return setErrorExternal(this, tr("Closing guest session failed"), 3066 GuestErrorInfo(GuestErrorInfo::Type_Session, rcGuest, mData.mSession.mName.c_str())); 3065 { 3066 GuestErrorInfo ge(GuestErrorInfo::Type_Session, rcGuest, mData.mSession.mName.c_str()); 3067 return setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Closing guest session failed: %s"), 3068 GuestBase::getErrorAsString(ge).c_str()); 3069 } 3067 3070 return setError(VBOX_E_IPRT_ERROR, tr("Closing guest session \"%s\" failed with %Rrc"), 3068 3071 mData.mSession.mName.c_str(), vrc); … … 3165 3168 { 3166 3169 if (GuestProcess::i_isGuestError(vrc)) 3167 return setErrorExternal(this, tr("Querying type for guest source failed"), 3168 GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, (*itSource).c_str())); 3170 { 3171 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, (*itSource).c_str()); 3172 return setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying type for guest source failed: %s"), 3173 GuestBase::getErrorAsString(ge).c_str()); 3174 } 3169 3175 else 3170 3176 return setError(E_FAIL, tr("Querying type for guest source \"%s\" failed: %Rrc"), (*itSource).c_str(), vrc); … … 3388 3394 { 3389 3395 if (GuestProcess::i_isGuestError(vrc)) 3390 hrc = setErrorExternal(this, tr("Guest directory creation failed"), 3391 GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str())); 3396 { 3397 GuestErrorInfo ge(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()); 3398 return setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Guest directory creation failed: %s"), 3399 GuestBase::getErrorAsString(ge).c_str()); 3400 } 3392 3401 else 3393 3402 { … … 3435 3444 { 3436 3445 case VERR_GSTCTL_GUEST_ERROR: 3437 hrc = setErrorExternal(this, tr("Temporary guest directory creation failed"), 3438 GuestErrorInfo(GuestErrorInfo::Type_ToolMkTemp, rcGuest, aPath.c_str())); 3439 break; 3440 3446 { 3447 GuestErrorInfo ge(GuestErrorInfo::Type_ToolMkTemp, rcGuest, aPath.c_str()); 3448 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Temporary guest directory creation failed: %s"), 3449 GuestBase::getErrorAsString(ge).c_str()); 3450 break; 3451 } 3441 3452 default: 3442 3453 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Temporary guest directory creation \"%s\" with template \"%s\" failed: %Rrc"), … … 3478 3489 break; 3479 3490 default: 3480 hrc = setErrorExternal(this, "Querying directory existence failed", 3481 GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str())); 3491 { 3492 GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()); 3493 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying directory existence failed: %s"), 3494 GuestBase::getErrorAsString(ge).c_str()); 3482 3495 break; 3496 } 3483 3497 } 3484 3498 break; … … 3547 3561 3548 3562 case VERR_GSTCTL_GUEST_ERROR: 3549 hrc = setErrorExternal(this, tr("Opening guest directory failed"), 3550 GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str())); 3551 break; 3552 3563 { 3564 GuestErrorInfo ge(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()); 3565 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Opening guest directory failed: %s"), 3566 GuestBase::getErrorAsString(ge).c_str()); 3567 break; 3568 } 3553 3569 default: 3554 3570 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Opening guest directory \"%s\" failed: %Rrc"), aPath.c_str(), vrc); … … 3586 3602 3587 3603 case VERR_GSTCTL_GUEST_ERROR: 3588 hrc = setErrorExternal(this, tr("Removing guest directory failed"), 3589 GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str())); 3590 break; 3591 3604 { 3605 GuestErrorInfo ge(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()); 3606 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Removing guest directory failed: %s"), 3607 GuestBase::getErrorAsString(ge).c_str()); 3608 break; 3609 } 3592 3610 default: 3593 3611 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Removing guest directory \"%s\" failed: %Rrc"), aPath.c_str(), vrc); … … 3666 3684 3667 3685 case VERR_GSTCTL_GUEST_ERROR: 3668 hrc = setErrorExternal(this, tr("Recursively removing guest directory failed"), 3669 GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str())); 3670 break; 3671 3686 { 3687 GuestErrorInfo ge(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()); 3688 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Recursively removing guest directory failed: %s"), 3689 GuestBase::getErrorAsString(ge).c_str()); 3690 break; 3691 } 3672 3692 default: 3673 3693 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Recursively removing guest directory \"%s\" failed: %Rrc"), … … 3811 3831 3812 3832 default: 3813 hrc = setErrorExternal(this, tr("Querying guest file existence failed"), 3814 GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str())); 3833 { 3834 GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()); 3835 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying guest file existence failed: %s"), 3836 GuestBase::getErrorAsString(ge).c_str()); 3815 3837 break; 3838 } 3816 3839 } 3817 3840 … … 3929 3952 3930 3953 case VERR_GSTCTL_GUEST_ERROR: 3931 hrc = setErrorExternal(this, tr("Opening guest file failed"), 3932 GuestErrorInfo(GuestErrorInfo::Type_File, rcGuest, aPath.c_str())); 3933 break; 3934 3954 { 3955 GuestErrorInfo ge(GuestErrorInfo::Type_File, rcGuest, aPath.c_str()); 3956 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Opening guest file failed: %s"), 3957 GuestBase::getErrorAsString(ge).c_str()); 3958 break; 3959 } 3935 3960 default: 3936 3961 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Opening guest file \"%s\" failed: %Rrc"), aPath.c_str(), vrc); … … 3960 3985 { 3961 3986 if (GuestProcess::i_isGuestError(vrc)) 3962 hrc = setErrorExternal(this, tr("Querying guest file size failed"), 3963 GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str())); 3987 { 3988 GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()); 3989 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying guest file size failed: %s"), 3990 GuestBase::getErrorAsString(ge).c_str()); 3991 } 3964 3992 else 3965 3993 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Querying guest file size of \"%s\" failed: %Rrc"), … … 4002 4030 } 4003 4031 else 4004 hrc = setErrorExternal(this, tr("Querying guest file existence information failed"), 4005 GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str())); 4032 { 4033 GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()); 4034 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying guest file existence information failed: %s"), 4035 GuestBase::getErrorAsString(ge).c_str()); 4036 } 4006 4037 } 4007 4038 else … … 4041 4072 { 4042 4073 if (GuestProcess::i_isGuestError(vrc)) 4043 hrc = setErrorExternal(this, tr("Querying guest file information failed"), 4044 GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str())); 4074 { 4075 GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()); 4076 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying guest file information failed: %s"), 4077 GuestBase::getErrorAsString(ge).c_str()); 4078 } 4045 4079 else 4046 4080 hrc = setErrorVrc(vrc, tr("Querying guest file information for \"%s\" failed: %Rrc"), aPath.c_str(), vrc); … … 4066 4100 { 4067 4101 if (GuestProcess::i_isGuestError(vrc)) 4068 hrc = setErrorExternal(this, tr("Removing guest file failed"), 4069 GuestErrorInfo(GuestErrorInfo::Type_ToolRm, rcGuest, aPath.c_str())); 4102 { 4103 GuestErrorInfo ge(GuestErrorInfo::Type_ToolRm, rcGuest, aPath.c_str()); 4104 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Removing guest file failed: %s"), 4105 GuestBase::getErrorAsString(ge).c_str()); 4106 } 4070 4107 else 4071 4108 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Removing guest file \"%s\" failed: %Rrc"), aPath.c_str(), vrc); … … 4125 4162 4126 4163 case VERR_GSTCTL_GUEST_ERROR: 4127 hrc = setErrorExternal(this, tr("Renaming guest path failed"), 4128 GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, aSource.c_str())); 4129 break; 4130 4164 { 4165 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, aSource.c_str()); 4166 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Renaming guest path failed: %s"), 4167 GuestBase::getErrorAsString(ge).c_str()); 4168 break; 4169 } 4131 4170 default: 4132 4171 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Renaming guest path \"%s\" failed: %Rrc"), … … 4360 4399 { 4361 4400 case VERR_GSTCTL_GUEST_ERROR: 4362 hrc = setErrorExternal(this, tr("Waiting for guest process failed"), 4363 GuestErrorInfo(GuestErrorInfo::Type_Session, rcGuest, mData.mSession.mName.c_str())); 4364 break; 4365 4401 { 4402 GuestErrorInfo ge(GuestErrorInfo::Type_Session, rcGuest, mData.mSession.mName.c_str()); 4403 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Waiting for guest process failed: %s"), 4404 GuestBase::getErrorAsString(ge).c_str()); 4405 break; 4406 } 4366 4407 case VERR_TIMEOUT: 4367 4408 *aReason = GuestSessionWaitResult_Timeout; -
trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
r90693 r91503 1160 1160 hrc = S_OK; 1161 1161 else if (vrc == VERR_NOT_FOUND) 1162 hrc = setErrorBoth(E_FAIL, vrc, "Plug-in '%s' was not found", aName.c_str());1162 hrc = setErrorBoth(E_FAIL, vrc, tr("Plug-in '%s' was not found"), aName.c_str()); 1163 1163 else 1164 hrc = setErrorVrc(vrc, "Error unloading '%s': %Rrc", aName.c_str(), vrc);1164 hrc = setErrorVrc(vrc, tr("Error unloading '%s': %Rrc"), aName.c_str(), vrc); 1165 1165 } 1166 1166 } … … 1237 1237 aDmesg.jolt(); 1238 1238 else if (vrc == VERR_BUFFER_OVERFLOW) 1239 hrc = setError(E_FAIL, "Too much log available, must use the maxMessages parameter to restrict.");1239 hrc = setError(E_FAIL, tr("Too much log available, must use the maxMessages parameter to restrict.")); 1240 1240 else 1241 1241 hrc = setErrorVrc(vrc); … … 1245 1245 } 1246 1246 else 1247 hrc = setError(E_FAIL, "The dmesg interface isn't implemented by guest OS digger, or detectOS() has not been called.");1247 hrc = setError(E_FAIL, tr("The dmesg interface isn't implemented by guest OS digger, or detectOS() has not been called.")); 1248 1248 } 1249 1249 return hrc; … … 1540 1540 1541 1541 if (!ptrVM.isOk()) 1542 return setError(VBOX_E_INVALID_VM_STATE, "Machine is not running");1542 return setError(VBOX_E_INVALID_VM_STATE, tr("Machine is not running")); 1543 1543 1544 1544 STAMR3Reset(ptrVM.rawUVM(), aPattern.c_str()); … … 1558 1558 1559 1559 if (!ptrVM.isOk()) 1560 return setError(VBOX_E_INVALID_VM_STATE, "Machine is not running");1560 return setError(VBOX_E_INVALID_VM_STATE, tr("Machine is not running")); 1561 1561 1562 1562 STAMR3Dump(ptrVM.rawUVM(), aPattern.c_str()); … … 1577 1577 Console::SafeVMPtrQuiet ptrVM(mParent); 1578 1578 if (!ptrVM.isOk()) 1579 return setError(VBOX_E_INVALID_VM_STATE, "Machine is not running");1579 return setError(VBOX_E_INVALID_VM_STATE, tr("Machine is not running")); 1580 1580 1581 1581 char *pszSnapshot; … … 1621 1621 } 1622 1622 else 1623 hrc = setError(VBOX_E_INVALID_VM_STATE, "Machine is not running");1623 hrc = setError(VBOX_E_INVALID_VM_STATE, tr("Machine is not running")); 1624 1624 return hrc; 1625 1625 } … … 1670 1670 } 1671 1671 else 1672 hrc = setError(VBOX_E_INVALID_VM_STATE, "A sample report is already in progress");1672 hrc = setError(VBOX_E_INVALID_VM_STATE, tr("A sample report is already in progress")); 1673 1673 } 1674 1674 -
trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp
r91314 r91503 162 162 { 163 163 if (ASMAtomicIncU32(&g_cInstances) != 1) 164 AssertFailedStmt(throw setError(E_FAIL, tr("Attempted to create more than one VirtualBoxClient instance")));164 AssertFailedStmt(throw setError(E_FAIL, "Attempted to create more than one VirtualBoxClient instance")); 165 165 166 166 mData.m_ThreadWatcher = NIL_RTTHREAD; … … 182 182 183 183 rc = unconst(mData.m_pEventSource).createObject(); 184 AssertComRCThrow(rc, setError(rc, tr("Could not create EventSource for VirtualBoxClient")));184 AssertComRCThrow(rc, setError(rc, "Could not create EventSource for VirtualBoxClient")); 185 185 rc = mData.m_pEventSource->init(); 186 AssertComRCThrow(rc, setError(rc, tr("Could not initialize EventSource for VirtualBoxClient")));186 AssertComRCThrow(rc, setError(rc, "Could not initialize EventSource for VirtualBoxClient")); 187 187 188 188 /* HACK ALERT! This is for DllCanUnloadNow(). */ … … 195 195 mData.m_pVBoxTranslator = VirtualBoxTranslator::instance(); 196 196 if (mData.m_pVBoxTranslator == NULL) 197 throw setError(VBOX_E_IPRT_ERROR, tr("Failed to create translator instance"));197 throw setError(VBOX_E_IPRT_ERROR, "Failed to create translator instance"); 198 198 199 199 char szNlsPath[RTPATH_MAX]; -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r91416 r91503 939 939 return hVfsIosPt; 940 940 941 setErrorVrc(vrc, "RTManifestEntryAddPassthruIoStream failed with rc=%Rrc", vrc);941 setErrorVrc(vrc, tr("RTManifestEntryAddPassthruIoStream failed with rc=%Rrc"), vrc); 942 942 return NIL_RTVFSIOSTREAM; 943 943 } -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r90441 r91503 1326 1326 HRESULT hrc = S_OK; 1327 1327 bool fKeepDownloadedObject = false;//in the future should be passed from the caller 1328 Utf8Str strLastActualErrorDesc("No errors");1329 1328 1330 1329 /* Clear the list of imported machines, if any */ … … 1533 1532 if (FAILED(hrc)) 1534 1533 { 1535 strLastActualErrorDesc = Utf8StrFmt("%s: Cloud import (cloud phase) failed. " 1536 "Used cloud instance is \'%s\'\n", __FUNCTION__, strInsId.c_str()); 1537 1538 LogRel((strLastActualErrorDesc.c_str())); 1539 hrc = setError(hrc, strLastActualErrorDesc.c_str()); 1534 LogRel(("%s: Cloud import (cloud phase) failed. " 1535 "Used cloud instance is \'%s\'\n", __FUNCTION__, strInsId.c_str())); 1536 hrc = setError(hrc, tr("%s: Cloud import (cloud phase) failed. " 1537 "Used cloud instance is \'%s\'\n"), __FUNCTION__, strInsId.c_str()); 1540 1538 break; 1541 1539 } … … 1596 1594 if (FAILED(hrc)) 1597 1595 { 1598 /** @todo r=bird: Using heap to keep a readonly C-string is a real wonderful 1599 * way to doing things. */ 1600 Utf8Str generalRollBackErrorMessage("Rollback action for Import Cloud operation failed. " 1601 "Some leavings may exist on the local disk or in the Cloud."); 1596 const char *pszGeneralRollBackErrorMessage = tr("Rollback action for Import Cloud operation failed. " 1597 "Some leavings may exist on the local disk or in the Cloud."); 1602 1598 /* 1603 1599 * Roll-back actions. … … 1620 1616 GET_VSD_DESCRIPTION_BY_TYPE(VirtualSystemDescriptionType_HardDiskImage)//aVBoxValues is set in this #define 1621 1617 if (aVBoxValues.size() == 0) 1622 hrc = setErrorVrc(VERR_NOT_FOUND, generalRollBackErrorMessage.c_str());1618 hrc = setErrorVrc(VERR_NOT_FOUND, pszGeneralRollBackErrorMessage); 1623 1619 else 1624 1620 { … … 1631 1627 if (RT_FAILURE(vrc)) 1632 1628 { 1633 hrc = setErrorVrc(vrc, generalRollBackErrorMessage.c_str());1629 hrc = setErrorVrc(vrc, pszGeneralRollBackErrorMessage); 1634 1630 LogRel(("%s: Rollback action - the object %s hasn't been deleted\n", __FUNCTION__, vsdData.c_str())); 1635 1631 } … … 1707 1703 vrc = RTVfsIoStrmOpenNormal(strAbsSrcPath.c_str(), RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_NONE, &hVfsIosSrc); 1708 1704 if (RT_FAILURE(vrc)) 1709 { 1710 strLastActualErrorDesc = Utf8StrFmt("Error opening '%s' for reading (%Rrc)\n", strAbsSrcPath.c_str(), vrc); 1711 throw setErrorVrc(vrc, strLastActualErrorDesc.c_str()); 1712 } 1705 throw setErrorVrc(vrc, tr("Error opening '%s' for reading (%Rrc)\n"), strAbsSrcPath.c_str(), vrc); 1713 1706 1714 1707 vrc = RTZipTarFsStreamFromIoStream(hVfsIosSrc, 0 /*fFlags*/, &hVfsFssObject); 1715 1708 RTVfsIoStrmRelease(hVfsIosSrc); 1716 1709 if (RT_FAILURE(vrc)) 1717 { 1718 strLastActualErrorDesc = Utf8StrFmt("Error reading the downloaded file '%s' (%Rrc)", strAbsSrcPath.c_str(), vrc); 1719 throw setErrorVrc(vrc, strLastActualErrorDesc.c_str()); 1720 } 1710 throw setErrorVrc(vrc, tr("Error reading the downloaded file '%s' (%Rrc)"), strAbsSrcPath.c_str(), vrc); 1721 1711 1722 1712 /* Create a new virtual system and work directly on the list copy. */ … … 1923 1913 { 1924 1914 hrc = aRc; 1925 strLastActualErrorDesc.printf("%s: Processing the downloaded object was failed. The exception (%Rhrc)\n", 1926 __FUNCTION__, hrc); 1927 LogRel((strLastActualErrorDesc.c_str())); 1915 LogRel(("%s: Processing the downloaded object was failed. The exception (%Rhrc)\n", 1916 __FUNCTION__, hrc)); 1928 1917 } 1929 1918 catch (int aRc) 1930 1919 { 1931 1920 hrc = setErrorVrc(aRc); 1932 strLastActualErrorDesc.printf("%s: Processing the downloaded object was failed. The exception (%Rrc/%Rhrc)\n", 1933 __FUNCTION__, aRc, hrc); 1934 LogRel((strLastActualErrorDesc.c_str())); 1921 LogRel(("%s: Processing the downloaded object was failed. The exception (%Rrc/%Rhrc)\n", 1922 __FUNCTION__, aRc, hrc)); 1935 1923 } 1936 1924 catch (...) 1937 1925 { 1938 1926 hrc = setErrorVrc(VERR_UNEXPECTED_EXCEPTION); 1939 strLastActualErrorDesc.printf("%s: Processing the downloaded object was failed. The exception (VERR_UNEXPECTED_EXCEPTION/%Rhrc)\n", 1940 __FUNCTION__, hrc); 1941 LogRel((strLastActualErrorDesc.c_str())); 1927 LogRel(("%s: Processing the downloaded object was failed. The exception (VERR_UNEXPECTED_EXCEPTION/%Rhrc)\n", 1928 __FUNCTION__, hrc)); 1942 1929 } 1943 1930 } … … 2073 2060 { 2074 2061 hrc = aRc; 2075 strLastActualErrorDesc.printf("%s: Cloud import (local phase) failed. The exception (%Rhrc)\n", 2076 __FUNCTION__, hrc); 2077 LogRel((strLastActualErrorDesc.c_str())); 2062 LogRel(("%s: Cloud import (local phase) failed. The exception (%Rhrc)\n", 2063 __FUNCTION__, hrc)); 2078 2064 } 2079 2065 catch (int aRc) 2080 2066 { 2081 2067 hrc = setErrorVrc(aRc); 2082 strLastActualErrorDesc.printf("%s: Cloud import (local phase) failed. The exception (%Rrc/%Rhrc)\n", 2083 __FUNCTION__, aRc, hrc); 2084 LogRel((strLastActualErrorDesc.c_str())); 2068 LogRel(("%s: Cloud import (local phase) failed. The exception (%Rrc/%Rhrc)\n", 2069 __FUNCTION__, aRc, hrc)); 2085 2070 } 2086 2071 catch (...) 2087 2072 { 2088 2073 hrc = setErrorVrc(VERR_UNRESOLVED_ERROR); 2089 strLastActualErrorDesc.printf("%s: Cloud import (local phase) failed. The exception (VERR_UNRESOLVED_ERROR/%Rhrc)\n", 2090 __FUNCTION__, hrc); 2091 LogRel((strLastActualErrorDesc.c_str())); 2074 LogRel(("%s: Cloud import (local phase) failed. The exception (VERR_UNRESOLVED_ERROR/%Rhrc)\n", 2075 __FUNCTION__, hrc)); 2092 2076 } 2093 2077 … … 3237 3221 } 3238 3222 else 3239 hrc = setErrorVrc(vrc, "RTCrX509CertPathsSetValidTimeSpec failed: %Rrc", vrc);3223 hrc = setErrorVrc(vrc, tr("RTCrX509CertPathsSetValidTimeSpec failed: %Rrc"), vrc); 3240 3224 } 3241 3225 else if (vrc == VERR_CR_X509_CPV_NO_TRUSTED_PATHS) … … 3313 3297 if (pSignedData->SignerInfos.cItems > 1) 3314 3298 { 3315 RTStrPrintf(szSignatureBuf, sizeof(szSignatureBuf), tr("%s #%u"), pszSignature, iSigner + 1);3299 RTStrPrintf(szSignatureBuf, sizeof(szSignatureBuf), "%s #%u", pszSignature, iSigner + 1); 3316 3300 pszSignature = szSignatureBuf; 3317 3301 } … … 4819 4803 throw setError(aRC, Utf8Str(info.getText()).c_str()); 4820 4804 else 4821 throw setError(aRC, "Unknown error during OVF import");4805 throw setError(aRC, tr("Unknown error during OVF import")); 4822 4806 } 4823 4807 } … … 5088 5072 throw setError(aRC, Utf8Str(info.getText()).c_str()); 5089 5073 else 5090 throw setError(aRC, "Unknown error during OVF import");5074 throw setError(aRC, tr("Unknown error during OVF import")); 5091 5075 } 5092 5076 } -
trunk/src/VBox/Main/src-server/CertificateImpl.cpp
r84249 r91503 417 417 /* Insurance. */ 418 418 NOREF(aResult); 419 return setError(E_FAIL, "Unknown item %u", aWhat);419 return setError(E_FAIL, tr("Unknown item %u"), aWhat); 420 420 } 421 421 … … 568 568 vrc = RTAsn1EncodeToBuffer(a_pAsn1Obj, 0, &a_rReturn.front(), a_rReturn.size(), NULL); 569 569 if (RT_FAILURE(vrc)) 570 hrc = setErrorVrc(vrc, "RTAsn1EncodeToBuffer failed with %Rrc", vrc);570 hrc = setErrorVrc(vrc, tr("RTAsn1EncodeToBuffer failed with %Rrc"), vrc); 571 571 } 572 572 } 573 573 else 574 hrc = setErrorVrc(vrc, "RTAsn1EncodePrepare failed with %Rrc", vrc);574 hrc = setErrorVrc(vrc, tr("RTAsn1EncodePrepare failed with %Rrc"), vrc); 575 575 } 576 576 return hrc; -
trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
r85235 r91503 1017 1017 continue; 1018 1018 } 1019 return setErrorBoth(VBOX_E_FILE_ERROR, vrc, "Reading '%s' failed: %Rrc - %s",1019 return setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Reading '%s' failed: %Rrc - %s"), 1020 1020 m->strLeasesFilename.c_str(), vrc, e.what()); 1021 1021 } … … 1023 1023 { 1024 1024 if (e.what()) 1025 return setError(VBOX_E_FILE_ERROR, "Reading '%s' failed: %s", m->strLeasesFilename.c_str(), e.what());1026 return setError(VBOX_E_FILE_ERROR, "Reading '%s' failed: RTCError", m->strLeasesFilename.c_str());1025 return setError(VBOX_E_FILE_ERROR, tr("Reading '%s' failed: %s"), m->strLeasesFilename.c_str(), e.what()); 1026 return setError(VBOX_E_FILE_ERROR, tr("Reading '%s' failed: RTCError"), m->strLeasesFilename.c_str()); 1027 1027 } 1028 1028 catch (std::bad_alloc &) -
trunk/src/VBox/Main/src-server/HostImpl.cpp
r91333 r91503 3917 3917 { 3918 3918 RTVfsDirRelease(hVfsDir); 3919 return setError(E_OUTOFMEMORY, "Out of memory! (direntry buffer)");3919 return setError(E_OUTOFMEMORY, tr("Out of memory! (direntry buffer)")); 3920 3920 } 3921 3921 … … 3934 3934 if (pDirEntry) 3935 3935 continue; 3936 hrc = setError(E_OUTOFMEMORY, "Out of memory! (direntry buffer)");3936 hrc = setError(E_OUTOFMEMORY, tr("Out of memory! (direntry buffer)")); 3937 3937 } 3938 3938 else if (rc != VERR_NO_MORE_FILES) 3939 hrc = setError(VBOX_E_IPRT_ERROR, "RTVfsDirReadEx failed: %Rrc", rc);3939 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsDirReadEx failed: %Rrc"), rc); 3940 3940 break; 3941 3941 } … … 3951 3951 try 3952 3952 { 3953 aDriveList.push_back(std::pair<com::Utf8Str, com::Utf8Str>(szPhysicalDrive, "Unknown (Access denied)"));3953 aDriveList.push_back(std::pair<com::Utf8Str, com::Utf8Str>(szPhysicalDrive, tr("Unknown (Access denied)"))); 3954 3954 } 3955 3955 catch (std::bad_alloc &) 3956 3956 { 3957 hrc = setError(E_OUTOFMEMORY, "Out of memory");3957 hrc = setError(E_OUTOFMEMORY, tr("Out of memory")); 3958 3958 break; 3959 3959 } … … 4000 4000 catch (std::bad_alloc &) 4001 4001 { 4002 hrc = setError(E_OUTOFMEMORY, "Out of memory");4002 hrc = setError(E_OUTOFMEMORY, tr("Out of memory")); 4003 4003 break; 4004 4004 } -
trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
r85248 r91503 620 620 if (aIPV6NetworkMaskPrefixLength > 128) 621 621 return mVirtualBox->setErrorBoth(E_INVALIDARG, VERR_INVALID_PARAMETER, 622 "Invalid IPv6 prefix length");622 tr("Invalid IPv6 prefix length")); 623 623 624 624 int rc; … … 631 631 if (RT_FAILURE(rc)) 632 632 { 633 return mVirtualBox->setErrorBoth(E_INVALIDARG, rc, "Invalid IPv6 address");633 return mVirtualBox->setErrorBoth(E_INVALIDARG, rc, tr("Invalid IPv6 address")); 634 634 } 635 635 -
trunk/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp
r85252 r91503 214 214 { 215 215 if (RT_FAILURE(vrc)) 216 hr = pVirtualBox->setErrorBoth(VBOX_E_IPRT_ERROR, vrc, "Failed to get webcam list: %Rrc", vrc); 216 hr = pVirtualBox->setErrorBoth(VBOX_E_IPRT_ERROR, vrc, 217 HostVideoInputDevice::tr("Failed to get webcam list: %Rrc"), vrc); 217 218 } 218 219 } -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r91470 r91503 2961 2961 // get the client's IInternalSessionControl interface 2962 2962 ComPtr<IInternalSessionControl> pSessionControl = aSession; 2963 ComAssertMsgRet(!!pSessionControl, ( "No IInternalSessionControl interface"),2963 ComAssertMsgRet(!!pSessionControl, (tr("No IInternalSessionControl interface")), 2964 2964 E_INVALIDARG); 2965 2965 … … 3562 3562 ComObjPtr<Medium> medium = static_cast<Medium*>(aM); 3563 3563 if (aMedium && medium.isNull()) 3564 return setError(E_INVALIDARG, "The given medium pointer is invalid");3564 return setError(E_INVALIDARG, tr("The given medium pointer is invalid")); 3565 3565 3566 3566 AutoCaller mediumCaller(medium); … … 4450 4450 ComObjPtr<BandwidthGroup> group = static_cast<BandwidthGroup*>(iB); 4451 4451 if (aBandwidthGroup && group.isNull()) 4452 return setError(E_INVALIDARG, "The given bandwidth group pointer is invalid");4452 return setError(E_INVALIDARG, tr("The given bandwidth group pointer is invalid")); 4453 4453 4454 4454 AutoWriteLock attLock(pAttach COMMA_LOCKVAL_SRC_POS); … … 4530 4530 ComObjPtr<Medium> pMedium = static_cast<Medium*>(iM); 4531 4531 if (aMedium && pMedium.isNull()) 4532 return setError(E_INVALIDARG, "The given medium pointer is invalid");4532 return setError(E_INVALIDARG, tr("The given medium pointer is invalid")); 4533 4533 4534 4534 AutoCaller mediumCaller(pMedium); … … 5267 5267 ComObjPtr<Medium> pMedium = static_cast<Medium*>(pIMedium); 5268 5268 if (pMedium.isNull()) 5269 return setError(E_INVALIDARG, "The given medium pointer with index %d is invalid", i);5269 return setError(E_INVALIDARG, tr("The given medium pointer with index %d is invalid"), i); 5270 5270 SafeArray<BSTR> ids; 5271 5271 rc = pMedium->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(ids)); … … 13503 13503 } 13504 13504 } 13505 ComAssertMsgRet(found, ( "The session is not found in the session list!"),13505 ComAssertMsgRet(found, (tr("The session is not found in the session list!")), 13506 13506 E_INVALIDARG); 13507 13507 } -
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r91326 r91503 873 873 * IMachine corresponding to a mutable machine as d->pSrcMachine */ 874 874 if (d->pSrcMachine->i_isSessionMachine()) 875 throw p->setError(E_INVALIDARG, "The source machine is mutable");875 throw p->setError(E_INVALIDARG, tr("The source machine is mutable")); 876 876 877 877 /* Handle the special case that someone is requesting a _full_ clone … … 1048 1048 1049 1049 if (RT_FAILURE(vrc)) 1050 p->setErrorBoth(VBOX_E_IPRT_ERROR, vrc, "Could not create machine clone thread (%Rrc)", vrc);1050 p->setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Could not create machine clone thread (%Rrc)"), vrc); 1051 1051 } 1052 1052 catch (HRESULT rc2) -
trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp
r91363 r91503 1000 1000 1001 1001 for (ULONG i = operation + 1; i < operationCount - operation; ++i) 1002 taskMoveVM->m_pProgress->SetNextOperation(BstrFmt( "Skip the empty operation %d...", i + 1).raw(), 1);1002 taskMoveVM->m_pProgress->SetNextOperation(BstrFmt(tr("Skip the empty operation %d..."), i + 1).raw(), 1); 1003 1003 1004 1004 hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediumsMap); … … 1027 1027 { 1028 1028 Log2(("Rollback scenario: can't delete new destination folder.\n")); 1029 throw machine->setErrorVrc(vrc, "Rollback scenario: can't delete new destination folder.");1029 throw machine->setErrorVrc(vrc, tr("Rollback scenario: can't delete new destination folder.")); 1030 1030 } 1031 1031 … … 1101 1101 1102 1102 for (ULONG i = operation; i < operation + taskMoveVM->m_finalMediumsMap.size() - 1; ++i) 1103 taskMoveVM->m_pProgress->SetNextOperation(BstrFmt( "Skip the empty operation %d...", i).raw(), 1);1103 taskMoveVM->m_pProgress->SetNextOperation(BstrFmt(tr("Skip the empty operation %d..."), i).raw(), 1); 1104 1104 1105 1105 hrc = taskMoveVM->deleteFiles(originalFiles); … … 1341 1341 { 1342 1342 Log2(("Deleting file %s ...\n", listOfFiles.at(i).c_str())); 1343 hrc = m_pProgress->SetNextOperation(BstrFmt( "Deleting file %s...", listOfFiles.at(i).c_str()).raw(), 1);1343 hrc = m_pProgress->SetNextOperation(BstrFmt(tr("Deleting file %s..."), listOfFiles.at(i).c_str()).raw(), 1); 1344 1344 if (FAILED(hrc)) return hrc; 1345 1345 -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r90785 r91503 2269 2269 ++m->readers; 2270 2270 2271 ComAssertMsgBreak(m->readers != 0, ( "Counter overflow"), rc = E_FAIL);2271 ComAssertMsgBreak(m->readers != 0, (tr("Counter overflow")), rc = E_FAIL); 2272 2272 2273 2273 /* Remember pre-lock state */ … … 2321 2321 case MediumState_LockedRead: 2322 2322 { 2323 ComAssertMsgBreak(m->readers != 0, ( "Counter underflow"), rc = E_FAIL);2323 ComAssertMsgBreak(m->readers != 0, (tr("Counter underflow")), rc = E_FAIL); 2324 2324 --m->readers; 2325 2325 … … 6994 6994 { 6995 6995 RT_NOREF(aTarget); 6996 return (m->fMoveThisMedium == true) ? true:false; /** @todo r=bird: this is not an obfuscation contest! */6996 return m->fMoveThisMedium; 6997 6997 } 6998 6998 … … 7762 7762 7763 7763 ComAssertMsgRet(!m->formatObj->i_getFileExtensions().empty(), 7764 ( "Must be at least one extension if it is MediumFormatCapabilities_File\n"),7764 (tr("Must be at least one extension if it is MediumFormatCapabilities_File\n")), 7765 7765 E_FAIL); 7766 7766 7767 7767 Utf8Str strExt = m->formatObj->i_getFileExtensions().front(); 7768 7768 ComAssertMsgRet(!strExt.isEmpty(), 7769 ( "Default extension must not be empty\n"),7769 (tr("Default extension must not be empty\n")), 7770 7770 E_FAIL); 7771 7771 -
trunk/src/VBox/Main/src-server/NATNetworkImpl.cpp
r90955 r91503 152 152 { 153 153 return setError(E_FAIL, 154 "Unable to change settings"155 " while NATNetwork instance is running");154 tr("Unable to change settings" 155 " while NATNetwork instance is running")); 156 156 } 157 157 … … 287 287 rc = RTNetStrToIPv4Cidr(aIPv4NetworkCidr.c_str(), &Net, &iPrefix); 288 288 if (RT_FAILURE(rc)) 289 return setError(E_FAIL, "%s is not a valid IPv4 CIDR notation",289 return setError(E_FAIL, tr("%s is not a valid IPv4 CIDR notation"), 290 290 aIPv4NetworkCidr.c_str()); 291 291 … … 297 297 */ 298 298 if (iPrefix > 30) 299 return setError(E_FAIL, "%s network is too small", aIPv4NetworkCidr.c_str());299 return setError(E_FAIL, tr("%s network is too small"), aIPv4NetworkCidr.c_str()); 300 300 301 301 rc = RTNetPrefixToMaskIPv4(iPrefix, &Mask); … … 306 306 if ((Net.u & ~Mask.u) != 0) 307 307 return setError(E_FAIL, 308 "%s: the specified address is longer than the specified prefix",308 tr("%s: the specified address is longer than the specified prefix"), 309 309 aIPv4NetworkCidr.c_str()); 310 310 … … 442 442 if (RT_FAILURE(rc)) 443 443 return setError(E_INVALIDARG, 444 "%s is not a valid IPv6 prefix",444 tr("%s is not a valid IPv6 prefix"), 445 445 aIPv6Prefix.c_str()); 446 446 … … 450 450 else if (iPrefixLength != 64) 451 451 return setError(E_INVALIDARG, 452 "Invalid IPv6 prefix length %d, must be 64",452 tr("Invalid IPv6 prefix length %d, must be 64"), 453 453 iPrefixLength); 454 454 … … 457 457 && ((Net6.au8[0] & 0xfe) != 0xfc)) /* local fc00::/7 */ 458 458 return setError(E_INVALIDARG, 459 "IPv6 prefix %RTnaipv6 is not unicast",459 tr("IPv6 prefix %RTnaipv6 is not unicast"), 460 460 &Net6); 461 461 … … 463 463 if (Net6.au64[1] != 0) 464 464 return setError(E_INVALIDARG, 465 "Non-zero bits in the interface ID part"466 " of the IPv6 prefix %RTnaipv6/64",465 tr("Non-zero bits in the interface ID part" 466 " of the IPv6 prefix %RTnaipv6/64"), 467 467 &Net6); 468 468 … … 473 473 return setError(E_OUTOFMEMORY); 474 474 else 475 return setError(E_FAIL, "Internal error");475 return setError(E_FAIL, tr("Internal error")); 476 476 } 477 477 } … … 489 489 /* only allow prefix to be empty if IPv6 is disabled */ 490 490 if (strNormalizedIPv6Prefix.isEmpty() && m->s.fIPv6Enabled) 491 return setError(E_FAIL, "Setting an empty IPv6 prefix when IPv6 is enabled");491 return setError(E_FAIL, tr("Setting an empty IPv6 prefix when IPv6 is enabled")); 492 492 493 493 /** -
trunk/src/VBox/Main/src-server/PerformanceImpl.cpp
r90771 r91503 381 381 382 382 if (FAILED(rc)) 383 return setError(E_FAIL, "Failed to setup metrics for '%s'",383 return setError(E_FAIL, tr("Failed to setup metrics for '%s'"), 384 384 getFailedGuestName().c_str()); 385 385 return rc; … … 417 417 418 418 if (FAILED(rc)) 419 return setError(E_FAIL, "Failed to enable metrics for '%s'",419 return setError(E_FAIL, tr("Failed to enable metrics for '%s'"), 420 420 getFailedGuestName().c_str()); 421 421 return rc; … … 453 453 454 454 if (FAILED(rc)) 455 return setError(E_FAIL, "Failed to disable metrics for '%s'",455 return setError(E_FAIL, tr("Failed to disable metrics for '%s'"), 456 456 getFailedGuestName().c_str()); 457 457 return rc; -
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r91502 r91503 1520 1520 { 1521 1521 if (mpInstaller == NULL) 1522 return setErrorBoth(E_FAIL, VERR_WRONG_ORDER, "prepare() not yet called");1522 return setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("prepare() not yet called")); 1523 1523 1524 1524 // Fetch all available storage controllers … … 2368 2368 { 2369 2369 if (aAuxiliaryBasePath.isEmpty()) 2370 return setError(E_INVALIDARG, "Empty base path is not allowed");2370 return setError(E_INVALIDARG, tr("Empty base path is not allowed")); 2371 2371 if (!RTPathStartsWithRoot(aAuxiliaryBasePath.c_str())) 2372 return setError(E_INVALIDARG, "Base path must be absolute");2372 return setError(E_INVALIDARG, tr("Base path must be absolute")); 2373 2373 2374 2374 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); -
trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp
r85276 r91503 686 686 687 687 if (FAILED(hrc)) 688 return setError(hrc, "failed to query the library setting\n");688 return setError(hrc, tr("failed to query the library setting\n")); 689 689 } 690 690 -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r91416 r91503 1394 1394 NOREF(aSharedFolders); 1395 1395 1396 return setError(E_NOTIMPL, "Not yet implemented");1396 return setError(E_NOTIMPL, tr("Not yet implemented")); 1397 1397 } 1398 1398 … … 2441 2441 2442 2442 if (format.isEmpty()) 2443 return setError(E_INVALIDARG, "Format must be Valid Type%s", format.c_str());2443 return setError(E_INVALIDARG, tr("Format must be Valid Type%s"), format.c_str()); 2444 2444 2445 2445 // enforce read-only for DVDs even if caller specified ReadWrite … … 2457 2457 2458 2458 default: 2459 return setError(E_INVALIDARG, "Device type must be HardDisk, DVD or Floppy %d", aDeviceType);2459 return setError(E_INVALIDARG, tr("Device type must be HardDisk, DVD or Floppy %d"), aDeviceType); 2460 2460 } 2461 2461 … … 2514 2514 2515 2515 default: 2516 return setError(E_INVALIDARG, "Device type must be HardDisk, DVD or Floppy %d", aDeviceType);2516 return setError(E_INVALIDARG, tr("Device type must be HardDisk, DVD or Floppy %d"), aDeviceType); 2517 2517 } 2518 2518 … … 2589 2589 NOREF(aAutoMountPoint); 2590 2590 2591 return setError(E_NOTIMPL, "Not yet implemented");2591 return setError(E_NOTIMPL, tr("Not yet implemented")); 2592 2592 } 2593 2593 … … 2595 2595 { 2596 2596 NOREF(aName); 2597 return setError(E_NOTIMPL, "Not yet implemented");2597 return setError(E_NOTIMPL, tr("Not yet implemented")); 2598 2598 } 2599 2599 … … 4223 4223 if (mediumType == DeviceType_DVD) 4224 4224 return setError(E_INVALIDARG, 4225 "Cannot mount DVD medium '%s' as floppy", strLocationFull.c_str());4225 tr("Cannot mount DVD medium '%s' as floppy"), strLocationFull.c_str()); 4226 4226 else 4227 4227 return setError(E_INVALIDARG, 4228 "Cannot mount floppy medium '%s' as DVD", strLocationFull.c_str());4228 tr("Cannot mount floppy medium '%s' as DVD"), strLocationFull.c_str()); 4229 4229 } 4230 4230 -
trunk/src/VBox/Main/src-server/generic/NetIf-generic.cpp
r85267 r91503 39 39 #include "ProgressImpl.h" 40 40 #include "VirtualBoxImpl.h" 41 #include "VBoxNls.h" 41 42 #include "Global.h" 42 43 #include "netif.h" 43 44 44 45 #define VBOXNETADPCTL_NAME "VBoxNetAdpCtl" 46 47 DECLARE_TRANSLATION_CONTEXT(NetIfGeneric); 48 45 49 46 50 static int NetIfAdpCtl(const char * pcszIfName, const char *pszAddr, const char *pszOption, const char *pszMask) … … 204 208 { 205 209 hrc = progress->init(pVirtualBox, host, 206 "Creating host only network interface",210 NetIfGeneric::tr("Creating host only network interface"), 207 211 FALSE /* aCancelable */); 208 212 if (SUCCEEDED(hrc)) … … 217 221 COM_IIDOF(IHostNetworkInterface), 218 222 HostNetworkInterface::getStaticComponentName(), 219 "Failed to get program path, vrc=%Rrc\n", vrc);223 NetIfGeneric::tr("Failed to get program path, vrc=%Rrc\n"), vrc); 220 224 return vrc; 221 225 } … … 266 270 COM_IIDOF(IHostNetworkInterface), 267 271 HostNetworkInterface::getStaticComponentName(), 268 "Failed to get config info for %s (as reported by '" VBOXNETADPCTL_NAME " add')\n", szBuf); 272 NetIfGeneric::tr("Failed to get config info for %s (as reported by 'VBoxNetAdpCtl add')\n"), 273 szBuf); 269 274 } 270 275 else … … 285 290 COM_IIDOF(IHostNetworkInterface), 286 291 HostNetworkInterface::getStaticComponentName(), 287 "Failed to execute '%s' - exit status: %d", szAdpCtl, vrc);292 NetIfGeneric::tr("Failed to execute '%s' - exit status: %d"), szAdpCtl, vrc); 288 293 vrc = VERR_INTERNAL_ERROR; 289 294 } … … 295 300 COM_IIDOF(IHostNetworkInterface), 296 301 HostNetworkInterface::getStaticComponentName(), 297 "Failed to execute '%s' (errno %d). Check permissions!",302 NetIfGeneric::tr("Failed to execute '%s' (errno %d). Check permissions!"), 298 303 szAdpCtl, errno); 299 304 pclose(fp); … … 307 312 COM_IIDOF(IHostNetworkInterface), 308 313 HostNetworkInterface::getStaticComponentName(), 309 "Failed to execute '%s' (errno %d / %Rrc). Check permissions!",314 NetIfGeneric::tr("Failed to execute '%s' (errno %d / %Rrc). Check permissions!"), 310 315 szAdpCtl, errno, vrc); 311 316 } … … 352 357 Utf8Str strIfName(ifname); 353 358 354 hrc = progress->init(pVirtualBox, host, "Removing host network interface", FALSE /* aCancelable */);359 hrc = progress->init(pVirtualBox, host, NetIfGeneric::tr("Removing host network interface"), FALSE /* aCancelable */); 355 360 if (SUCCEEDED(hrc)) 356 361 { … … 361 366 COM_IIDOF(IHostNetworkInterface), 362 367 HostNetworkInterface::getStaticComponentName(), 363 "Failed to execute '" VBOXNETADPCTL_NAME " %s remove' (%Rrc)",368 NetIfGeneric::tr("Failed to execute 'VBoxNetAdpCtl %s remove' (%Rrc)"), 364 369 strIfName.c_str(), vrc); 365 370 else -
trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
r85265 r91503 46 46 #include "ProgressImpl.h" 47 47 #include "VirtualBoxImpl.h" 48 #include "VBoxNls.h" 48 49 #include "Global.h" 49 50 #include "netif.h" 50 51 #include "ThreadTask.h" 52 53 DECLARE_TRANSLATION_CONTEXT(NetIfWin); 51 54 52 55 #ifdef VBOX_WITH_NETFLT … … 1163 1166 { 1164 1167 hrc = progress->init(pVirtualBox, host, 1165 Bstr( _T("Creating host only network interface")).raw(),1168 Bstr(NetIfWin::tr("Creating host only network interface")).raw(), 1166 1169 FALSE /* aCancelable */); 1167 1170 if (SUCCEEDED(hrc)) … … 1211 1214 { 1212 1215 hrc = progress->init(pVirtualBox, host, 1213 Bstr( _T("Removing host network interface")).raw(),1216 Bstr(NetIfWin::tr("Removing host network interface")).raw(), 1214 1217 FALSE /* aCancelable */); 1215 1218 if (SUCCEEDED(hrc)) … … 1258 1261 { 1259 1262 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1260 Bstr( "Enabling Dynamic Ip Configuration").raw(),1263 Bstr(NetIfWin::tr("Enabling Dynamic Ip Configuration")).raw(), 1261 1264 FALSE /* aCancelable */); 1262 1265 if (SUCCEEDED(rc)) … … 1316 1319 { 1317 1320 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1318 Bstr( "Enabling Dynamic Ip Configuration").raw(),1321 Bstr(NetIfWin::tr("Enabling Dynamic Ip Configuration")).raw(), 1319 1322 FALSE /* aCancelable */); 1320 1323 if (SUCCEEDED(rc)) … … 1373 1376 { 1374 1377 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1375 Bstr( "Enabling Dynamic Ip Configuration").raw(),1378 Bstr(NetIfWin::tr("Enabling Dynamic Ip Configuration")).raw(), 1376 1379 FALSE /* aCancelable */); 1377 1380 if (SUCCEEDED(rc)) … … 1428 1431 { 1429 1432 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1430 Bstr( "Enabling Dynamic Ip Configuration").raw(),1433 Bstr(NetIfWin::tr("Enabling Dynamic Ip Configuration")).raw(), 1431 1434 FALSE /* aCancelable */); 1432 1435 if (SUCCEEDED(rc))
Note:
See TracChangeset
for help on using the changeset viewer.