generator: change exit(1) -> throw
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
df4c9d7bdb
commit
01238c805a
|
@ -27,7 +27,7 @@ Generator::Generator() /*noexcept*/ {
|
|||
}
|
||||
catch (CryptoPP::Exception& e) {
|
||||
fmt::print(stderr, "{}\n", e.what());
|
||||
exit(1);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
Generator::~Generator() noexcept {}
|
||||
|
@ -43,7 +43,7 @@ void Generator::initialize_generator() {
|
|||
}
|
||||
catch (CryptoPP::Exception& e) {
|
||||
fmt::print(stderr, "{}\n", e.what());
|
||||
exit(1);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,7 @@ auto Generator::reseed(const std::string& s) -> void {
|
|||
}
|
||||
catch (std::exception& e) {
|
||||
fmt::print("{}", e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +122,7 @@ auto Generator::do_crypto() -> std::string {
|
|||
}
|
||||
catch (CryptoPP::Exception& e) {
|
||||
fmt::print(stderr, "{}\n", e.what());
|
||||
exit(1);
|
||||
throw;
|
||||
}
|
||||
|
||||
// Pretty print cipher text
|
||||
|
|
Reference in New Issue