summaryrefslogtreecommitdiff
path: root/datatest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'datatest.cpp')
-rw-r--r--datatest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/datatest.cpp b/datatest.cpp
index cd43175..79609e8 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -409,6 +409,8 @@ void OutputNameValuePairs(const NameValuePairs &v)
void TestDataFile(const std::string &filename, unsigned int &totalTests, unsigned int &failedTests)
{
std::ifstream file(filename.c_str());
+ if (!file.good())
+ throw Exception(Exception::OTHER_ERROR, "Can not open file " + filename + " for reading");
TestData v;
s_currentTestData = &v;
std::string name, value, lastAlgName;