fixed fallback step-logger

moved vap-grouping to settings-file
sanity-checks
This commit is contained in:
2016-10-02 18:28:17 +02:00
parent a4a8593023
commit 3a1cd1bccc
9 changed files with 95 additions and 32 deletions

View File

@@ -7,6 +7,8 @@
#include <unordered_map>
#include "IPINHelper.h"
#include <Indoor/Exception.h>
class EvalConfig {
private:
@@ -31,9 +33,10 @@ public:
/** load the given configuration file */
void load(const std::string& file) {
std::ifstream inp(file);
if (!inp.good()) {throw "error while opening config file " + file;}
if (!inp.good()) {throw Exception("error while opening config file " + file);}
std::string line;
@@ -78,7 +81,7 @@ private:
// split key and value
const size_t pos = line.find(" = ");
if (pos == std::string::npos) {throw "something wrong";}
if (pos == std::string::npos) {throw Exception("something wrong");}
const std::string key = line.substr(0, pos);
const std::string val = line.substr(pos+3);