From a6fdb3369ac42c0c51918be9e7bd8216a87126e7 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 21 Apr 2019 17:11:23 +0200 Subject: [PATCH] Make unsuccessful testFilePath() throw an exception --- tests/testutils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/testutils.cpp b/tests/testutils.cpp index bc219fe..d48021a 100644 --- a/tests/testutils.cpp +++ b/tests/testutils.cpp @@ -261,7 +261,9 @@ string TestApplication::testFilePath(const string &relativeTestFilePath) const // file still not found -> return default path if (!fileExists(path = "./testfiles/" + relativeTestFilePath)) { - cerr << Phrases::Warning << "The testfile \"" << relativeTestFilePath << "\" can not be located." << Phrases::EndFlush; + throw runtime_error("The testfile \"" % relativeTestFilePath % "\" can not be located. Was looking under: \"" + % m_testFilesPath % relativeTestFilePath % "\", \"" % m_fallbackTestFilesPath % relativeTestFilePath + % "\" and \"./testfiles/" % relativeTestFilePath + "\""); } return path; }