Changeset 2169


Ignore:
Timestamp:
28/05/2008 13:13:52 (4 years ago)
Author:
chris
Message:

Add backtrace on exception in release builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/common/Box.h

    r2127 r2169  
    1818#include "BoxPlatform.h" 
    1919 
    20 // uncomment this line to enable full memory leak finding on all malloc-ed blocks (at least, ones used by the STL) 
     20// uncomment this line to enable full memory leak finding on all 
     21// malloc-ed blocks (at least, ones used by the STL) 
    2122//#define MEMLEAKFINDER_FULL_MALLOC_MONITORING 
    2223 
    23 #ifndef NDEBUG 
    24         #ifdef HAVE_EXECINFO_H 
    25                 #define SHOW_BACKTRACE_ON_EXCEPTION 
    26         #endif 
     24// Show backtraces on exceptions in release builds until further notice 
     25// (they are only logged at TRACE level anyway) 
     26#ifdef HAVE_EXECINFO_H 
     27        #define SHOW_BACKTRACE_ON_EXCEPTION 
    2728#endif 
    2829 
     
    4445        #define ASSERT(cond) {if(!(cond)) {BoxDebugAssertFailed(#cond, __FILE__, __LINE__); THROW_EXCEPTION(CommonException, AssertFailed)}} 
    4546 
    46         // Note that syslog tracing is independent of BoxDebugTraceOn, but stdout tracing is not 
     47        // Note that syslog tracing is independent of BoxDebugTraceOn, 
     48        // but stdout tracing is not 
    4749        extern bool BoxDebugTraceToSyslog; 
    4850        #define TRACE_TO_SYSLOG(x) {BoxDebugTraceToSyslog = x;} 
Note: See TracChangeset for help on using the changeset viewer.