Skip to content

Commit

Permalink
add error if seed file is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
Ithanil committed Dec 10, 2018
1 parent b5464f5 commit 44f3f89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MPIMCI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ namespace MPIMCI
std::ifstream seedfile;
seedfile.open(filename);

if (!seedfile.good()) {throw std::runtime_error("Random seed file could not be found.");}

for (int i=0; i<offset; ++i) {
if (seedfile.eof()) {throw std::runtime_error("Chosen seed offset is already larger than the number of seeds in seed file.");}
uint_fast64_t skip;
Expand Down

0 comments on commit 44f3f89

Please sign in to comment.