diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-04-22 14:06:49 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-04-22 14:06:49 +0000 |
commit | 2ae391bba728884f076bb4d4eba04b581aa750a0 (patch) | |
tree | 0ddf4f2e8e4de0af9090cc634d291d375e9712c1 | |
parent | 5cf9d57447c66eb4b286fea39ebbe0731f0f8084 (diff) |
Use logging framework to log exceptions. (refs #3)
-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 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 |