Merge pull request #3156 from kjetilly/kjetilly_reserved_keyword_fix
Remove use of reserved identifier in OPM_THROW.
This commit is contained in:
commit
26a566ef94
@ -49,22 +49,22 @@
|
|||||||
// 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 opmErrorMacroOStringStream; \
|
||||||
oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
|
opmErrorMacroOStringStream << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
|
||||||
::Opm::OpmLog::error(oss__.str()); \
|
::Opm::OpmLog::error(opmErrorMacroOStringStream.str()); \
|
||||||
throw Exception(oss__.str()); \
|
throw Exception(opmErrorMacroOStringStream.str()); \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
// Same as OPM_THROW, except for not making an OpmLog::error() call.
|
// Same as OPM_THROW, except for not making an OpmLog::error() call.
|
||||||
//
|
//
|
||||||
// Usage: OPM_THROW_NOLOG(ExceptionClass, "Error message " << value);
|
// Usage: OPM_THROW_NOLOG(ExceptionClass, "Error message " << value);
|
||||||
#define OPM_THROW_NOLOG(Exception, message) \
|
#define OPM_THROW_NOLOG(Exception, message) \
|
||||||
do { \
|
do { \
|
||||||
std::ostringstream oss__; \
|
std::ostringstream opmErrorMacroOStringStream; \
|
||||||
oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
|
opmErrorMacroOStringStream << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
|
||||||
throw Exception(oss__.str()); \
|
throw Exception(opmErrorMacroOStringStream.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