diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-05-28 12:13:52 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-05-28 12:13:52 +0000 |
commit | 9b16225615e5416412d3a46ae97b0eccc744fa5c (patch) | |
tree | 47269a92c5fd7a6944932faa38f115a5926cf622 /lib/common/Box.h | |
parent | 5295edbaec1058e3c293723ccfe6c639fdc413ff (diff) |
Add backtrace on exception in release builds.
Diffstat (limited to 'lib/common/Box.h')
-rw-r--r-- | lib/common/Box.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/common/Box.h b/lib/common/Box.h index dd91dfe2..5929d5b8 100644 --- a/lib/common/Box.h +++ b/lib/common/Box.h @@ -17,13 +17,14 @@ #include "BoxPlatform.h" -// uncomment this line to enable full memory leak finding on all malloc-ed blocks (at least, ones used by the STL) +// uncomment this line to enable full memory leak finding on all +// malloc-ed blocks (at least, ones used by the STL) //#define MEMLEAKFINDER_FULL_MALLOC_MONITORING -#ifndef NDEBUG - #ifdef HAVE_EXECINFO_H - #define SHOW_BACKTRACE_ON_EXCEPTION - #endif +// Show backtraces on exceptions in release builds until further notice +// (they are only logged at TRACE level anyway) +#ifdef HAVE_EXECINFO_H + #define SHOW_BACKTRACE_ON_EXCEPTION #endif #ifdef SHOW_BACKTRACE_ON_EXCEPTION @@ -43,7 +44,8 @@ void BoxDebugAssertFailed(const char *cond, const char *file, int line); #define ASSERT(cond) {if(!(cond)) {BoxDebugAssertFailed(#cond, __FILE__, __LINE__); THROW_EXCEPTION(CommonException, AssertFailed)}} - // Note that syslog tracing is independent of BoxDebugTraceOn, but stdout tracing is not + // Note that syslog tracing is independent of BoxDebugTraceOn, + // but stdout tracing is not extern bool BoxDebugTraceToSyslog; #define TRACE_TO_SYSLOG(x) {BoxDebugTraceToSyslog = x;} extern bool BoxDebugTraceToStdout; |