Merge pull request #365 from bska/shadowing-symbols
Reduce likelihood of shadowing symbols in OPM_THROW
This commit is contained in:
commit
4eb03c7e87
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user