diff --git a/src/Platform/Datasets.cc b/src/Platform/Datasets.cc index fe04f41..717ccbc 100644 --- a/src/Platform/Datasets.cc +++ b/src/Platform/Datasets.cc @@ -16,11 +16,10 @@ namespace platform { vector tokens = Dataset::split(line, ','); string name = tokens[0]; string className; - try { - className = tokens[1]; - } - catch (exception e) { + if (tokens.size() == 1) { className = "-1"; + } else { + className = tokens[1]; } datasets[name] = make_unique(path, name, className, discretize, fileType); } diff --git a/src/Platform/DotEnv.h b/src/Platform/DotEnv.h index 401d5af..c481310 100644 --- a/src/Platform/DotEnv.h +++ b/src/Platform/DotEnv.h @@ -43,7 +43,7 @@ namespace platform { } std::string get(const std::string& key) { - return env[key]; + return env.at(key); } std::vector getSeeds() {