VirtualBox

Changeset 24267 in vbox


Ignore:
Timestamp:
Nov 2, 2009 3:33:06 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54239
Message:

VMSetError: Do a LogRel if no callbacks.

File:
1 edited

Legend:

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

    r24199 r24267  
    35553555     * Log the error.
    35563556     */
    3557     RTLogPrintf("VMSetError: %s(%d) %s\n", pszFile, iLine, pszFunction);
    35583557    va_list va3;
    35593558    va_copy(va3, *pArgs);
    3560     RTLogPrintfV(pszFormat, va3);
     3559    RTLogPrintf("VMSetError: %s(%d) %s\n%N\n", pszFile, iLine, pszFunction, pszFormat, &va3);
    35613560    va_end(va3);
    3562     RTLogPrintf("\n");
    35633561#endif
    35643562
     
    35723570     * Call the at error callbacks.
    35733571     */
     3572    bool fCalledSomeone = false;
    35743573    RTCritSectEnter(&pUVM->vm.s.AtErrorCritSect);
    35753574    for (PVMATERROR pCur = pUVM->vm.s.pAtError; pCur; pCur = pCur->pNext)
     
    35793578        pCur->pfnAtError(pUVM->pVM, pCur->pvUser, rc, RT_SRC_POS_ARGS, pszFormat, va2);
    35803579        va_end(va2);
     3580        fCalledSomeone = true;
    35813581    }
    35823582    RTCritSectLeave(&pUVM->vm.s.AtErrorCritSect);
     3583
     3584    /*
     3585     * Write the error to the release log if there weren't anyone to callback.
     3586     */
     3587    if (!fCalledSomeone)
     3588    {
     3589        va_list va3;
     3590        va_copy(va3, *pArgs);
     3591        RTLogRelPrintf("VMSetError: %s(%d) %s\nVMSetError: %N\n", pszFile, iLine, pszFunction, pszFormat, &va3);
     3592        va_end(va3);
     3593    }
    35833594}
    35843595
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