diff --git a/example.cpp b/example.cpp index 07bb12a..62a8292 100644 --- a/example.cpp +++ b/example.cpp @@ -13,6 +13,9 @@ int main(int argc, char** argv) } std::fstream input_file_graph{argv[1]}; + if (not input_file_graph.is_open()) { + throw std::runtime_error(std::string("Could not open file for reading: ") + argv[1]); + } ED::Graph const graph = ED::Graph::read_dimacs(input_file_graph); ED::Graph greedy_matching_as_graph{graph.num_nodes()};