| Revision 2415,
732 bytes
checked in by chris, 3 years ago
(diff) |
|
Rename NDEBUG flag to BOX_RELEASE_BUILD, as other projects use NDEBUG as
well (e.g. wxWidgets) and it causes conflicts which are difficult to
resolve.
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | // -------------------------------------------------------------------------- |
|---|
| 2 | // |
|---|
| 3 | // File |
|---|
| 4 | // Name: AssertFailed.cpp |
|---|
| 5 | // Purpose: Assert failure code |
|---|
| 6 | // Created: 2003/09/04 |
|---|
| 7 | // |
|---|
| 8 | // -------------------------------------------------------------------------- |
|---|
| 9 | |
|---|
| 10 | #ifndef BOX_RELEASE_BUILD |
|---|
| 11 | |
|---|
| 12 | #include "Box.h" |
|---|
| 13 | |
|---|
| 14 | #include <stdio.h> |
|---|
| 15 | |
|---|
| 16 | #ifdef WIN32 |
|---|
| 17 | #include "emu.h" |
|---|
| 18 | #else |
|---|
| 19 | #include <syslog.h> |
|---|
| 20 | #endif |
|---|
| 21 | |
|---|
| 22 | #include "MemLeakFindOn.h" |
|---|
| 23 | |
|---|
| 24 | bool AssertFailuresToSyslog = false; |
|---|
| 25 | |
|---|
| 26 | void BoxDebugAssertFailed(const char *cond, const char *file, int line) |
|---|
| 27 | { |
|---|
| 28 | printf("ASSERT FAILED: [%s] at %s(%d)\n", cond, file, line); |
|---|
| 29 | if(AssertFailuresToSyslog) |
|---|
| 30 | { |
|---|
| 31 | ::syslog(LOG_ERR, "ASSERT FAILED: [%s] at %s(%d)\n", cond, file, line); |
|---|
| 32 | } |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | #endif // BOX_RELEASE_BUILD |
|---|
| 37 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.