Make unsuccessful testFilePath() throw an exception

This commit is contained in:
Martchus 2019-04-21 17:11:23 +02:00
parent e9cc26478b
commit a6fdb3369a
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}