summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-04-22 14:06:49 +0000
committerChris Wilson <chris+github@qwirx.com>2007-04-22 14:06:49 +0000
commit2ae391bba728884f076bb4d4eba04b581aa750a0 (patch)
tree0ddf4f2e8e4de0af9090cc634d291d375e9712c1 /lib
parent5cf9d57447c66eb4b286fea39ebbe0731f0f8084 (diff)
Use logging framework to log exceptions. (refs #3)
Diffstat (limited to 'lib')
-rw-r--r--lib/common/Box.h14
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