diff --git a/src/etc/filefuncs.cpp b/src/etc/filefuncs.cpp index a5779bc..857b60c 100644 --- a/src/etc/filefuncs.cpp +++ b/src/etc/filefuncs.cpp @@ -9,10 +9,7 @@ string getFileContent(const string& file) fileStream.open(file, ios::in); if (fileStream.is_open()) while (getline(fileStream, lineinput)) { fullinput.append(lineinput + "\n"); - } else { - cout << "Could not open \"" << file << "\"." << endl; - exit(EXIT_FAILURE); - } + } else throw Yerbacon::Exception("Could not open \"" + file + "\"."); fileStream.close(); return fullinput; }