VirtualBox

Changeset 3760 in vbox for trunk/src


Ignore:
Timestamp:
Jul 22, 2007 10:18:54 AM (18 years ago)
Author:
vboxsync
Message:

use panic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/assert-r0drv-darwin.cpp

    r3706 r3760  
    3131#include <iprt/stdarg.h>
    3232
     33/*******************************************************************************
     34*   Global Variables                                                           *
     35*******************************************************************************/
     36/** The last assert message, 1st part. */
     37RTDATADECL(char) g_szRTAssertMsg1[1024];
     38/** The last assert message, 2nd part. */
     39RTDATADECL(char) g_szRTAssertMsg2[2048];
     40
    3341
    3442RTDECL(void) AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
     
    4553           "Location  : %s(%d) %s\r\n",
    4654           pszExpr, pszFile, uLine, pszFunction);
     55
     56    RTStrPrintf(g_szRTAssertMsg1, sizeof(g_szRTAssertMsg1),
     57                "\n!!Assertion Failed!!\n"
     58                "Expression: %s\n"
     59                "Location  : %s(%d) %s\n",
     60                pszExpr, pszFile, uLine, pszFunction);
    4761}
    4862
     
    6478    va_end(va);
    6579    printf("%s", szMsg);
     80
     81    va_start(va, pszFormat);
     82    RTStrPrintfV(g_szRTAssertMsg2, sizeof(g_szRTAssertMsg2), pszFormat, va);
     83    va_end(va);
     84
     85    panic("%s%s", g_szRTAssertMsg1, g_szRTAssertMsg2);
    6686}
    6787
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