From 76b64e28f65198a984b421196196cc4b12f86a4a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 15 Feb 2010 12:41:59 +0000 Subject: Support throwing exception with more complex stringstream-formatted messages. --- lib/common/Box.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/common') diff --git a/lib/common/Box.h b/lib/common/Box.h index 57b97416..4cab3a87 100644 --- a/lib/common/Box.h +++ b/lib/common/Box.h @@ -115,6 +115,8 @@ #define THROW_EXCEPTION_MESSAGE(type, subtype, message) \ { \ + std::ostringstream _box_throw_line; \ + _box_throw_line << message; \ if(!HideExceptionMessageGuard::ExceptionsHidden()) \ { \ OPTIONAL_DO_BACKTRACE \ @@ -122,7 +124,7 @@ #type "(" #subtype ") (" << message << \ ") at " __FILE__ "(" << __LINE__ << ")") \ } \ - throw type(type::subtype, message); \ + throw type(type::subtype, _box_throw_line.str()); \ } // extra macros for converting to network byte order -- cgit v1.2.3