Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
22f944ad
Commit
22f944ad
authored
Sep 04, 2013
by
Alexandre Duret-Lutz
Browse files
sat: catch write errors
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Throw exceptions on write errors.
parent
1f3b7e80
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tgbaalgos/dtbasat.cc
View file @
22f944ad
...
...
@@ -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
();
}
...
...
src/tgbaalgos/dtgbasat.cc
View file @
22f944ad
...
...
@@ -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
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment