Merge pull request #4345 from akva2/fix_macro

avoid double underscored symbol
This commit is contained in:
Bård Skaflestad 2023-01-03 17:14:29 +01:00 committed by GitHub
commit 716ea14cb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,11 +44,11 @@
// Usage: OPM_DEFLOG_THROW(ExceptionClass, "Error message", DeferredLogger); // Usage: OPM_DEFLOG_THROW(ExceptionClass, "Error message", DeferredLogger);
#define OPM_DEFLOG_THROW(Exception, message, deferred_logger) \ #define OPM_DEFLOG_THROW(Exception, message, deferred_logger) \
do { \ do { \
std::string oss__ = std::string{"["} + __FILE__ + ":" + \ std::string oss_ = std::string{"["} + __FILE__ + ":" + \
std::to_string(__LINE__) + "] " + \ std::to_string(__LINE__) + "] " + \
message; \ message; \
deferred_logger.error(oss__); \ deferred_logger.error(oss_); \
throw Exception(oss__); \ throw Exception(oss_); \
} while (false) } while (false)
namespace { namespace {