Skip to content
Snippets Groups Projects
Commit 27d280d5 authored by Martin Beseda's avatar Martin Beseda
Browse files

Simulator is now handling out-of-range exception thrown by CSVReader.

parent 1fc1c4b1
No related branches found
No related tags found
No related merge requests found
......@@ -43,8 +43,8 @@ int main(int argc, char** argv){
reader.read();
/* Create data set for both the training and testing of the neural network */
std::vector<unsigned int> inputs = {1};
std::vector<unsigned int> outputs = {17, 18, 19, 20, 21, 22, 23, 24, 25};
std::vector<unsigned int> inputs = { 2, 3, 4, 5, 6, 7, 8, 27, 28, 29 };
std::vector<unsigned int> outputs = {18, 19, 20, 21, 22, 23, 24, 25, 26};
l4n::DataSet ds = reader.get_data_set(&inputs, &outputs);
ds.normalize();
......@@ -124,9 +124,11 @@ int main(int argc, char** argv){
return 0;
} catch(const std::runtime_error& e) {
std::cout << e.what();
return -1;
std::cerr << e.what();
exit(EXIT_FAILURE);
} catch(const std::out_of_range& e) {
std::cerr << e.what();
exit(EXIT_FAILURE);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment