Merge pull request #365 from bska/shadowing-symbols

Reduce likelihood of shadowing symbols in OPM_THROW
This commit is contained in:
Atgeirr Flø Rasmussen 2013-09-11 04:33:33 -07:00
commit 4eb03c7e87

View File

@ -48,12 +48,12 @@
// std::runtime_error. // std::runtime_error.
// //
// Usage: OPM_THROW(ExceptionClass, "Error message " << value); // Usage: OPM_THROW(ExceptionClass, "Error message " << value);
#define OPM_THROW(Exception, message) \ #define OPM_THROW(Exception, message) \
do { \ do { \
std::ostringstream oss; \ std::ostringstream oss__; \
oss << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
OPM_MESSAGE(message); \ OPM_MESSAGE(message); \
throw Exception(oss.str()); \ throw Exception(oss__.str()); \
} while (false) } while (false)
// throw an exception if a condition is true // throw an exception if a condition is true