Improve the error messages

This commit is contained in:
Tiago Gomes
2012-12-20 18:07:50 +00:00
parent 685f46dc27
commit b44ed7db39
13 changed files with 49 additions and 55 deletions

View File

@@ -99,8 +99,7 @@ ElimGraph::exportToGraphViz (
{
ofstream out (fileName);
if (!out.is_open()) {
cerr << "error: cannot open file to write at " ;
cerr << "ElimGraph::exportToDotFile()" << endl;
cerr << "Error: couldn't open file '" << fileName << "'." ;
return;
}
out << "strict graph {" << endl;
@@ -115,7 +114,8 @@ ElimGraph::exportToGraphViz (
out << '"' << node->label() << '"' ;
out << " [shape=box3d]" << endl;
} else {
cerr << "error: invalid variable id: " << highlightVarIds[i] << endl;
cerr << "Error: invalid variable id: " << highlightVarIds[i] << "." ;
cerr << endl;
exit (EXIT_FAILURE);
}
}