MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / DaedalusAssert

Function DaedalusAssert

Source/SysOSX/Debug/DaedalusAssertOSX.cpp:32–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30DaedalusAssertHook gAssertHook = NULL;
31
32EAssertResult DaedalusAssert( const char * expression, const char * file, unsigned int line, const char * msg, ... )
33{
34 char buffer[ 1024 ];
35 va_list va;
36 va_start(va, msg);
37 vsnprintf( buffer, 1024, msg, va );
38 buffer[1023] = 0;
39 va_end(va);
40
41 printf( "************************************************************\n" );
42 printf( "Assert Failed: %s\n", expression );
43 printf( "Location: %s(%d)\n", file, line );
44 printf( "\n" );
45 printf( "%s\n", buffer );
46 printf( "\n" );
47
48 bool done = false;
49 while (!done)
50 {
51 printf( "a: abort, b: break, c: continue, i: ignore\n" );
52 switch (getchar())
53 {
54 case 'a': abort(); return AR_BREAK; // Should be unreachable.
55 case 'b': return AR_BREAK;
56 case 'c': return AR_IGNORE_ONCE;
57 case 'i': return AR_IGNORE;
58 }
59 }
60
61 return AR_IGNORE;
62}
63
64#endif //DAEDALUS_ENABLE_ASSERTS

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected