VirtualBox

Changeset 6298 in vbox


Ignore:
Timestamp:
Jan 9, 2008 4:21:32 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27163
Message:

When using VMSet.*Error() don't put %Vrc into the error message if the same code is passed to the function. Otherwise the error code is displayed twice in the popping up error box -- looks ugly.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/MMPagePool.cpp

    r5999 r6298  
    313313    if (pPool->fLow)
    314314        VMSetError(pPool->pVM, rc, RT_SRC_POS,
    315                    N_("Failed to expand page pool for memory below 4GB. current size: %d pages\n"),
     315                   N_("Failed to expand page pool for memory below 4GB. current size: %d pages"),
    316316                   pPool->cPages);
    317317    AssertMsgFailed(("Failed to expand pool%s. rc=%Vrc poolsize=%d\n",
  • trunk/src/VBox/VMM/TM.cpp

    r6183 r6298  
    222222        &&  g_pSUPGlobalInfoPage->u32UpdateIntervalNS >= 250000000 /* 0.25s */)
    223223        return VMSetError(pVM, VERR_INTERNAL_ERROR, RT_SRC_POS,
    224                           N_("The GIP update interval is too big. u32UpdateIntervalNS=%RU32 (u32UpdateHz=%RU32)\n"),
     224                          N_("The GIP update interval is too big. u32UpdateIntervalNS=%RU32 (u32UpdateHz=%RU32)"),
    225225                          g_pSUPGlobalInfoPage->u32UpdateIntervalNS, g_pSUPGlobalInfoPage->u32UpdateHz);
    226226
     
    271271    else if (VBOX_FAILURE(rc))
    272272        return VMSetError(pVM, rc, RT_SRC_POS,
    273                           N_("Configuration error: Failed to querying bool value \"UseRealTSC\". (%Vrc)"), rc);
     273                          N_("Configuration error: Failed to querying bool value \"UseRealTSC\""));
    274274
    275275    /* source */
     
    279279    else if (VBOX_FAILURE(rc))
    280280        return VMSetError(pVM, rc, RT_SRC_POS,
    281                           N_("Configuration error: Failed to querying bool value \"UseRealTSC\". (%Vrc)"), rc);
     281                          N_("Configuration error: Failed to querying bool value \"UseRealTSC\""));
    282282    if (!pVM->tm.s.fTSCUseRealTSC)
    283283        pVM->tm.s.fTSCVirtualized = true;
     
    307307    else if (VBOX_FAILURE(rc))
    308308        return VMSetError(pVM, rc, RT_SRC_POS,
    309                           N_("Configuration error: Failed to querying uint64_t value \"TSCTicksPerSecond\". (%Vrc)"), rc);
     309                          N_("Configuration error: Failed to querying uint64_t value \"TSCTicksPerSecond\""));
    310310    else if (   pVM->tm.s.cTSCTicksPerSecond < _1M
    311311             || pVM->tm.s.cTSCTicksPerSecond >= _4G)
     
    336336    else if (VBOX_FAILURE(rc))
    337337        return VMSetError(pVM, rc, RT_SRC_POS,
    338                           N_("Configuration error: Failed to querying 32-bit integer value \"ScheduleSlack\". (%Vrc)"), rc);
     338                          N_("Configuration error: Failed to querying 32-bit integer value \"ScheduleSlack\""));
    339339
    340340    rc = CFGMR3QueryU64(pCfgHandle, "CatchUpStopThreshold", &pVM->tm.s.u64VirtualSyncCatchUpStopThreshold);
     
    343343    else if (VBOX_FAILURE(rc))
    344344        return VMSetError(pVM, rc, RT_SRC_POS,
    345                           N_("Configuration error: Failed to querying 64-bit integer value \"CatchUpStopThreshold\". (%Vrc)"), rc);
     345                          N_("Configuration error: Failed to querying 64-bit integer value \"CatchUpStopThreshold\""));
    346346
    347347    rc = CFGMR3QueryU64(pCfgHandle, "CatchUpGiveUpThreshold", &pVM->tm.s.u64VirtualSyncCatchUpGiveUpThreshold);
     
    350350    else if (VBOX_FAILURE(rc))
    351351        return VMSetError(pVM, rc, RT_SRC_POS,
    352                           N_("Configuration error: Failed to querying 64-bit integer value \"CatchUpGiveUpThreshold\". (%Vrc)"), rc);
     352                          N_("Configuration error: Failed to querying 64-bit integer value \"CatchUpGiveUpThreshold\""));
    353353
    354354
     
    361361            u64 = UINT64_C(DefStart); \
    362362        else if (VBOX_FAILURE(rc)) \
    363             return VMSetError(pVM, rc, RT_SRC_POS, N_("Configuration error: Failed to querying 64-bit integer value \"CatchUpThreshold" #iPeriod "\". (%Vrc)"), rc); \
     363            return VMSetError(pVM, rc, RT_SRC_POS, N_("Configuration error: Failed to querying 64-bit integer value \"CatchUpThreshold" #iPeriod "\"")); \
    364364        if (    (iPeriod > 0 && u64 <= pVM->tm.s.aVirtualSyncCatchUpPeriods[iPeriod - 1].u64Start) \
    365365            ||  u64 >= pVM->tm.s.u64VirtualSyncCatchUpGiveUpThreshold) \
     
    370370            pVM->tm.s.aVirtualSyncCatchUpPeriods[iPeriod].u32Percentage = (DefPct); \
    371371        else if (VBOX_FAILURE(rc)) \
    372             return VMSetError(pVM, rc, RT_SRC_POS, N_("Configuration error: Failed to querying 32-bit integer value \"CatchUpPrecentage" #iPeriod "\". (%Vrc)"), rc); \
     372            return VMSetError(pVM, rc, RT_SRC_POS, N_("Configuration error: Failed to querying 32-bit integer value \"CatchUpPrecentage" #iPeriod "\"")); \
    373373    } while (0)
    374374    /* This needs more tuning. Not sure if we really need so many period and be so gentle. */
     
    394394    else if (VBOX_FAILURE(rc))
    395395        return VMSetError(pVM, rc, RT_SRC_POS,
    396                           N_("Configuration error: Failed to querying 64-bit integer value \"UTCOffset\". (%Vrc)"), rc);
     396                          N_("Configuration error: Failed to querying 64-bit integer value \"UTCOffset\""));
    397397
    398398    /*
     
    406406    else if (VBOX_FAILURE(rc))
    407407        return VMSetError(pVM, rc, RT_SRC_POS,
    408                           N_("Configuration error: Failed to querying uint32_t value \"WarpDrivePercent\". (%Vrc)"), rc);
     408                          N_("Configuration error: Failed to querying uint32_t value \"WarpDrivePercent\""));
    409409    else if (   pVM->tm.s.u32VirtualWarpDrivePercentage < 2
    410410             || pVM->tm.s.u32VirtualWarpDrivePercentage > 20000)
     
    425425    else if (VBOX_FAILURE(rc))
    426426        return VMSetError(pVM, rc, RT_SRC_POS,
    427                           N_("Configuration error: Failed to query uint32_t value \"TimerMillies\", rc=%Vrc.\n"), rc);
     427                          N_("Configuration error: Failed to query uint32_t value \"TimerMillies\""));
    428428    rc = RTTimerCreate(&pVM->tm.s.pTimer, u32Millies, tmR3TimerCallback, pVM);
    429429    if (VBOX_FAILURE(rc))
  • trunk/src/VBox/VMM/VM.cpp

    r5999 r6298  
    270270                                break;
    271271                            default:
    272                                 pszError = N_("Unknown error creating VM (%Vrc)");
     272                                /* XXX check if there was already an error message set! */
     273                                pszError = N_("Unknown error creating VM");
    273274                                AssertMsgFailed(("Add error message for rc=%d (%Vrc)\n", rc, rc));
    274275                        }
     
    363364                break;
    364365            default:
    365                 pszError = N_("Unknown error initializing kernel driver (%Vrc)");
     366                pszError = N_("Unknown error initializing kernel driver");
    366367                AssertMsgFailed(("Add error message for rc=%d (%Vrc)\n", rc, rc));
    367368        }
     
    11811182    {
    11821183        vmR3SetState(pVM, VMSTATE_LOAD_FAILURE);
    1183         rc = VMSetError(pVM, rc, RT_SRC_POS, N_("Unable to restore the virtual machine's saved state from '%s'.  It may be damaged or from an older version of VirtualBox.  Please discard the saved state before starting the virtual machine.  (Error: %Vrc)"), pszFilename, rc);
     1184        rc = VMSetError(pVM, rc, RT_SRC_POS, N_("Unable to restore the virtual machine's saved state from '%s'.  It may be damaged or from an older version of VirtualBox.  Please discard the saved state before starting the virtual machine"), pszFilename);
    11841185    }
    11851186
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette