Make OPM_THROW call OpmLog::error().
This commit is contained in:
parent
3c295815ad
commit
3e125643f5
@ -21,11 +21,12 @@
|
|||||||
#ifndef OPM_ERRORMACROS_HPP
|
#ifndef OPM_ERRORMACROS_HPP
|
||||||
#define OPM_ERRORMACROS_HPP
|
#define OPM_ERRORMACROS_HPP
|
||||||
|
|
||||||
|
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// macros for reporting to stderr
|
// macros for reporting to stderr
|
||||||
@ -52,7 +53,7 @@
|
|||||||
do { \
|
do { \
|
||||||
std::ostringstream oss__; \
|
std::ostringstream oss__; \
|
||||||
oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
|
oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
|
||||||
OPM_MESSAGE(message); \
|
Opm::OpmLog::error(oss__.str()); \
|
||||||
throw Exception(oss__.str()); \
|
throw Exception(oss__.str()); \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user