Skip to content
Snippets Groups Projects
Commit cad8781f authored by cmaffeo2's avatar cmaffeo2
Browse files

Abort when TabulatedPotential::countValueLines cannot open file

parent 77d9cfe2
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,10 @@ TabulatedPotential::~TabulatedPotential() {
int TabulatedPotential::countValueLines(const char* fileName) {
FILE* inp = fopen(fileName, "r");
if (inp == NULL) {
printf("TabulatedPotential::countValueLines Could not open file '%s'\n", fileName);
exit(-1);
}
char line[256];
int count = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment