added sanity check to csv

refactoring for wifi models
adjusted obj/mtl parsing
This commit is contained in:
k-a-z-u
2018-06-26 11:58:36 +02:00
parent 657e72b4c5
commit ae3b95cb0e
6 changed files with 38 additions and 24 deletions

View File

@@ -5,6 +5,7 @@
#include <string>
#include <fstream>
#include "../misc/Debug.h"
#include "../Exception.h"
class CSV {
@@ -54,6 +55,12 @@ public:
Doc doc;
std::ifstream inp(file.c_str());
// sanity check
if (!inp) {
throw Exception("failed to open file: " + file);
}
int rowCnt = 0;
std::string line;