From c664a0dfd2ccc2fd497ac589a78886e105346850 Mon Sep 17 00:00:00 2001 From: Kjetil Olsen Lye Date: Mon, 26 Sep 2022 11:51:37 +0200 Subject: [PATCH] Remove use of reserved identifier in OPM_THROW. --- opm/common/ErrorMacros.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/opm/common/ErrorMacros.hpp b/opm/common/ErrorMacros.hpp index 7204a7a7b..1c0bdda01 100644 --- a/opm/common/ErrorMacros.hpp +++ b/opm/common/ErrorMacros.hpp @@ -49,22 +49,22 @@ // std::runtime_error. // // Usage: OPM_THROW(ExceptionClass, "Error message " << value); -#define OPM_THROW(Exception, message) \ - do { \ - std::ostringstream oss__; \ - oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ - ::Opm::OpmLog::error(oss__.str()); \ - throw Exception(oss__.str()); \ +#define OPM_THROW(Exception, message) \ + do { \ + std::ostringstream opmErrorMacroOStringStream; \ + opmErrorMacroOStringStream << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ + ::Opm::OpmLog::error(opmErrorMacroOStringStream.str()); \ + throw Exception(opmErrorMacroOStringStream.str()); \ } while (false) // Same as OPM_THROW, except for not making an OpmLog::error() call. // // Usage: OPM_THROW_NOLOG(ExceptionClass, "Error message " << value); -#define OPM_THROW_NOLOG(Exception, message) \ - do { \ - std::ostringstream oss__; \ - oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ - throw Exception(oss__.str()); \ +#define OPM_THROW_NOLOG(Exception, message) \ + do { \ + std::ostringstream opmErrorMacroOStringStream; \ + opmErrorMacroOStringStream << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ + throw Exception(opmErrorMacroOStringStream.str()); \ } while (false) // throw an exception if a condition is true