Skip to content

Commit a9f1e4e

Browse files
pcaspersjenkins
authored andcommitted
QPR-12281 improve error message
1 parent 8791a5b commit a9f1e4e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

OREAnalytics/orea/scenario/scenariosimmarketparameters.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ namespace {
4242
template <typename T> const vector<T>& lookup(const map<string, vector<T>>& m, const string& k) {
4343
if (m.count(k) > 0) {
4444
return m.at(k);
45-
} else if (m.count("") > 0) {
46-
return m.at("");
45+
} else if (m.count(std::string()) > 0) {
46+
return m.at(std::string());
4747
} else
48-
QL_FAIL("no vector for key \"" << k << "\" found.");
48+
QL_FAIL("ScenarioSimMarketParameters: no vector for key \"" << k << "\" found.");
4949
}
5050

5151
template <typename T> const T& lookup(const map<string, T>& m, const string& k) {
5252
if (m.count(k) > 0) {
5353
return m.at(k);
54-
} else if (m.count("") > 0) {
55-
return m.at("");
54+
} else if (m.count(std::string()) > 0) {
55+
return m.at(std::string());
5656
} else
57-
QL_FAIL("no result for key \"" << k << "\" found.");
57+
QL_FAIL("ScenarioSimMarketParameters: no result for key \"" << k << "\" found.");
5858
}
5959

6060
} // namespace

0 commit comments

Comments
 (0)