From f604f94e89a676b5f844e8d309fdbd5b55a92010 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Tue, 22 Sep 2020 10:01:53 +0200 Subject: [PATCH] Document format placeholders in KeywordLocation --- opm/common/OpmLog/KeywordLocation.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/opm/common/OpmLog/KeywordLocation.hpp b/opm/common/OpmLog/KeywordLocation.hpp index 00f491063..13b955b8d 100644 --- a/opm/common/OpmLog/KeywordLocation.hpp +++ b/opm/common/OpmLog/KeywordLocation.hpp @@ -20,10 +20,25 @@ #ifndef KEYWORD_LOCATION_HPP #define KEYWORD_LOCATION_HPP +#include + namespace Opm { class KeywordLocation { public: + /* + Observe that many error messages whcih should print out the name of the + problem keyword along with the location {} placeholders can be used. The + convention is: + + {keyword} -> keyword + {file} -> filename + {line} -> lineno + + This convention must be adhered to at the call site *creating the output + string*. + */ + std::string keyword; std::string filename = ""; std::size_t lineno = 0;