Fix printed string showed when file opening fails

This commit is contained in:
Tiago Gomes
2013-02-13 19:18:55 +00:00
parent ab7f4c8113
commit 57f46e7c0d
5 changed files with 9 additions and 0 deletions

View File

@@ -81,6 +81,7 @@ BayesBallGraph::exportToGraphViz (const char* fileName)
std::ofstream out (fileName);
if (!out.is_open()) {
std::cerr << "Error: couldn't open file '" << fileName << "'." ;
std::cerr << std::endl;
return;
}
out << "digraph {" << std::endl;