write_sdc throw if open fails

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2021-12-08 10:23:44 -07:00
parent b7fa990328
commit e2e1199d92
1 changed files with 2 additions and 0 deletions

View File

@ -181,6 +181,8 @@ SdfWriter::write(const char *filename,
arc_delay_max_index_ = dcalc_ap->index(); arc_delay_max_index_ = dcalc_ap->index();
stream_ = gzopen(filename, gzip ? "wb" : "wT"); stream_ = gzopen(filename, gzip ? "wb" : "wT");
if (stream_ == nullptr)
throw FileNotWritable(filename);
writeHeader(default_lib, no_timestamp, no_version); writeHeader(default_lib, no_timestamp, no_version);
writeInterconnects(); writeInterconnects();