Commit 22f944ad authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

sat: catch write errors

* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Throw
exceptions on write errors.
parent 1f3b7e80
......@@ -660,6 +660,7 @@ namespace spot
#if DEBUG
std::fstream out("dtba-sat.dbg",
std::ios_base::trunc | std::ios_base::out);
out.exceptions(std::ifstream::failbit | std::ifstream::badbit);
std::set<int> positive;
#endif
......@@ -774,6 +775,7 @@ namespace spot
cnf = create_tmpfile("dtba-sat-", ".cnf");
std::fstream cnfs(cnf->name(),
std::ios_base::trunc | std::ios_base::out);
cnfs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
dtba_to_sat(cnfs, a, *current, state_based);
cnfs.close();
}
......
......@@ -869,6 +869,7 @@ namespace spot
#if DEBUG
std::fstream out("dtgba-sat.dbg",
std::ios_base::trunc | std::ios_base::out);
out.exceptions(std::ifstream::failbit | std::ifstream::badbit);
std::set<int> positive;
#endif
......@@ -982,6 +983,7 @@ namespace spot
cnf = create_tmpfile("dtgba-sat-", ".cnf");
std::fstream cnfs(cnf->name(),
std::ios_base::trunc | std::ios_base::out);
cnfs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
dtgba_to_sat(cnfs, a, *current, state_based);
cnfs.close();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment