diff --git a/generator.cpp b/generator.cpp index 52ed7ac..b3a84f3 100644 --- a/generator.cpp +++ b/generator.cpp @@ -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