From 2733267954e91e394fbb512ea3abb4c497c0752f Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 19 Jan 2008 15:08:54 +0100 Subject: import version 0.11rc1 This commit has been made by 'bzr import'. I used the upstream tarball of Version 0.11rc1 for creating it. It has the md5sum: 75608d8bb72dff9a556850ccd0ae8cb9 --- lib/common/Box.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'lib/common/Box.h') diff --git a/lib/common/Box.h b/lib/common/Box.h index 14a4a6ac..a262741d 100644 --- a/lib/common/Box.h +++ b/lib/common/Box.h @@ -1,4 +1,4 @@ -// distribution boxbackup-0.10 (svn version: 494) +// distribution boxbackup-0.11rc1 (svn version: 2023_2024) // // Copyright (c) 2003 - 2006 // Ben Summers and contributors. All rights reserved. @@ -65,13 +65,14 @@ #endif #ifdef SHOW_BACKTRACE_ON_EXCEPTION - #include "Utils.h" + #include "Utils.h" #define OPTIONAL_DO_BACKTRACE DumpStackBacktrace(); #else #define OPTIONAL_DO_BACKTRACE #endif #include "CommonException.h" +#include "Logging.h" #ifndef NDEBUG @@ -132,22 +133,27 @@ #ifdef BOX_MEMORY_LEAK_TESTING // Memory leak testing #include "MemLeakFinder.h" + #define DEBUG_NEW new(__FILE__,__LINE__) #define MEMLEAKFINDER_NOT_A_LEAK(x) memleakfinder_notaleak(x); + #define MEMLEAKFINDER_NO_LEAKS MemLeakSuppressionGuard _guard; + #define MEMLEAKFINDER_INIT memleakfinder_init(); #define MEMLEAKFINDER_START {memleakfinder_global_enable = true;} - #define MEMLEAKFINDER_STOP {memleakfinder_global_enable = false;} + #define MEMLEAKFINDER_STOP {memleakfinder_global_enable = false;} #else #define DEBUG_NEW new #define MEMLEAKFINDER_NOT_A_LEAK(x) + #define MEMLEAKFINDER_NO_LEAKS + #define MEMLEAKFINDER_INIT #define MEMLEAKFINDER_START #define MEMLEAKFINDER_STOP #endif - -#define THROW_EXCEPTION(type, subtype) \ - { \ - OPTIONAL_DO_BACKTRACE \ - TRACE1("Exception thrown: " #type "(" #subtype ") at " __FILE__ "(%d)\n", __LINE__) \ - throw type(type::subtype); \ +#define THROW_EXCEPTION(type, subtype) \ + { \ + OPTIONAL_DO_BACKTRACE \ + BOX_WARNING("Exception thrown: " #type "(" #subtype ") at " \ + __FILE__ "(" << __LINE__ << ")") \ + throw type(type::subtype); \ } // extra macros for converting to network byte order -- cgit v1.2.3