From 2ae391bba728884f076bb4d4eba04b581aa750a0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 22 Apr 2007 14:06:49 +0000 Subject: Use logging framework to log exceptions. (refs #3) --- lib/common/Box.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/common/Box.h b/lib/common/Box.h index 86c34acb..8faa2d58 100644 --- a/lib/common/Box.h +++ b/lib/common/Box.h @@ -27,13 +27,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 @@ -108,11 +109,12 @@ #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_TRACE("Exception thrown: " #type "(" #subtype ") at " \ + __FILE__ "(" << __LINE__ << ")") \ + throw type(type::subtype); \ } // extra macros for converting to network byte order -- cgit v1.2.3