Go to the documentation of this file.
19#ifndef OPM_GRID_ERROR_MACROS_HPP
20#define OPM_GRID_ERROR_MACROS_HPP
23#include <opm/common/ErrorMacros.hpp>
29#define OPM_THROW(Exception, message) \
31 std::string oss_ = std::string{"["} + __FILE__ + ":" + \
32 std::to_string(__LINE__) + "] " + \
34 throw Exception(oss_); \
37#define OPM_THROW_NOLOG OPM_THROW
40#define OPM_ERROR_IF(condition, message) do {if(condition){ OPM_THROW(std::logic_error, message);}} while(false)
42#define OPM_MESSAGE(x) do { std::cerr << x << std::endl; } while(false)
|