diff options
author | Chris Wilson <chris+github@qwirx.com> | 2010-02-15 12:41:59 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2010-02-15 12:41:59 +0000 |
commit | 76b64e28f65198a984b421196196cc4b12f86a4a (patch) | |
tree | 3a5cc85ae388f1904237a16bf354ddfefd4cc9a7 /lib/common | |
parent | 32506e95005d396f91557e4a730ca0ee8e2c3102 (diff) |
Support throwing exception with more complex stringstream-formatted
messages.
Diffstat (limited to 'lib/common')
-rw-r--r-- | lib/common/Box.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 |