VirtualBox

Ignore:
Timestamp:
Sep 22, 2010 5:12:01 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66128
Message:

Frontends/VBoxManage: Error printing cleanup, use stderr and consistent formatting. Small cleanups (like using Keyboard::PutScancodes instead of the more clumsy Keyboard::PutScancode and fixing the incorrect comment which attracted my attention).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp

    r32448 r32701  
    55
    66/*
    7  * Copyright (C) 2009 Oracle Corporation
     7 * Copyright (C) 2009-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    265265        // call interpret(); this can yield both warnings and errors, so we need
    266266        // to tinker with the error info a bit
    267         RTPrintf("Interpreting %ls...\n", path.raw());
     267        RTStrmPrintf(g_pStdErr, "Interpreting %ls...\n", path.raw());
    268268        rc = pAppliance->Interpret();
    269269        com::ErrorInfo info0(pAppliance, COM_IIDOF(IAppliance));
     
    276276            {
    277277                Bstr bstrWarning(aWarnings[i]);
    278                 RTPrintf("WARNING: %ls.\n", bstrWarning.raw());
     278                RTMsgWarning("%ls.", bstrWarning.raw());
    279279            }
    280280        }
     
    287287        }
    288288
    289         RTPrintf("OK.\n");
     289        RTStrmPrintf(g_pStdErr, "OK.\n");
    290290
    291291        // fetch all disks
     
    693693
    694694            if (cLicensesInTheWay == 1)
    695                 RTPrintf("ERROR: Cannot import until the license agreement listed above is accepted.\n");
     695                RTMsgError("Cannot import until the license agreement listed above is accepted.");
    696696            else if (cLicensesInTheWay > 1)
    697                 RTPrintf("ERROR: Cannot import until the %c license agreements listed above are accepted.\n", cLicensesInTheWay);
     697                RTMsgError("Cannot import until the %c license agreements listed above are accepted.", cLicensesInTheWay);
    698698
    699699            if (!cLicensesInTheWay && fExecute)
     
    935935                        else
    936936                        {
    937                             RTPrintf("ERROR: Cannot read license file \"%s\" which should be included in the virtual system %u.\n",
    938                                      itD->second.c_str(),
    939                                      i);
     937                            RTMsgError("Cannot read license file \"%s\" which should be included in the virtual system %u.",
     938                                       itD->second.c_str(), i);
    940939                            return 1;
    941940                        }
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