23 #include <opm/common/OpmLog/KeywordLocation.hpp> 67 template <
typename... Args>
70 Args&&... furtherLocations)
71 : locations { location, std::forward<Args>(furtherLocations)... }
73 (locations.size() == 1)
74 ? formatSingle(reason, locations.front())
75 : formatMultiple(reason, locations)
93 : locations { location }
94 , m_what { formatException(error, locations.front()) }
97 const char* what()
const noexcept
override 99 return this->m_what.c_str();
102 static std::string format(
const std::string& msg_format,
const KeywordLocation& loc);
108 std::vector<KeywordLocation> locations;
112 static std::string formatException(
const std::exception& e,
const KeywordLocation& loc);
113 static std::string formatSingle(
const std::string& reason,
const KeywordLocation&);
114 static std::string formatMultiple(
const std::string& reason,
const std::vector<KeywordLocation>&);
119 #endif // OPM_ERROR_HPP Definition: KeywordLocation.hpp:27
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30