[Box Backup-commit] COMMIT r2606 - box/trunk/lib/common

subversion at boxbackup.org subversion at boxbackup.org
Mon Feb 15 12:42:01 GMT 2010


Author: chris
Date: 2010-02-15 12:41:59 +0000 (Mon, 15 Feb 2010)
New Revision: 2606

Modified:
   box/trunk/lib/common/Box.h
Log:
Support throwing exception with more complex stringstream-formatted 
messages.


Modified: box/trunk/lib/common/Box.h
===================================================================
--- box/trunk/lib/common/Box.h	2010-02-11 08:39:37 UTC (rev 2605)
+++ box/trunk/lib/common/Box.h	2010-02-15 12:41:59 UTC (rev 2606)
@@ -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




More information about the Boxbackup-commit mailing list