Skip to content

Commit

Permalink
check if writing input powerspec file succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Findus23 committed Oct 24, 2024
1 parent 70da747 commit 3bdd753
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/transfer_function.hh
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ public:
<< std::endl;
}
}
if (ofs.fail()) {
std::string message = "Could not write to file: " + fname;
music::elog << message << std::endl;
throw std::runtime_error(message);
}
ofs.close();
}
}

Expand Down

0 comments on commit 3bdd753

Please sign in to comment.