added sanity check to csv
refactoring for wifi models adjusted obj/mtl parsing
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user