VirtualBox

Changeset 42167 in vbox for trunk/src


Ignore:
Timestamp:
Jul 16, 2012 2:33:25 PM (13 years ago)
Author:
vboxsync
Message:

Main/glue: fix code which prints error information

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/errorprint.cpp

    r38510 r42167  
    108108                                       uint32_t ulLine)
    109109{
    110     const com::ErrorInfo *pInfo = &info;
    111     do
     110    if (info.isFullAvailable() || info.isBasicAvailable())
    112111    {
    113         if (pInfo->isFullAvailable() || pInfo->isBasicAvailable())
     112        const com::ErrorInfo *pInfo = &info;
     113        do
     114        {
    114115            GluePrintErrorInfo(*pInfo);
    115         else
    116 #if defined (RT_OS_WIN)
    117             GluePrintRCMessage(rc);
    118 #else /* defined (RT_OS_WIN) */
    119             GluePrintRCMessage(pInfo->getResultCode());
    120 #endif
    121         pInfo = pInfo->getNext();
    122         /* If there is more than one error, separate them visually. */
    123         if (pInfo)
    124             RTMsgError("--------\n");
     116
     117            pInfo = pInfo->getNext();
     118            /* If there is more than one error, separate them visually. */
     119            if (pInfo)
     120            {
     121                /* If there are several errors then at least basic error
     122                 * information must be available, otherwise something went
     123                 * horribly wrong. */
     124                Assert(pInfo->isFullAvailable() || pInfo->isBasicAvailable());
     125
     126                RTMsgError("--------\n");
     127            }
     128        }
     129        while (pInfo);
    125130    }
    126     while(pInfo);
     131    else
     132        GluePrintRCMessage(rc);
    127133
    128134    GluePrintErrorContext(pcszContext, pcszSourceFile, ulLine);
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