diff --git a/generator.cpp b/generator.cpp index 8ef7a30..fb2dbc9 100644 --- a/generator.cpp +++ b/generator.cpp @@ -174,13 +174,9 @@ auto Generator::generate_random_data(const uint64_t& n) -> std::string { r = rr.substr(0, n); // not hex-encoded anymore, just ask for n chars rr.clear(); - } - catch (std::exception& e) { - fmt::print(stderr, "{}", e.what()); - } - /* re-key */ - try { + + /* re-key */ const std::string nu_G_k{generate_blocks(2)}; /* clear out the old key and set a new one */ @@ -188,7 +184,7 @@ auto Generator::generate_random_data(const uint64_t& n) -> std::string { std::memmove(G.k, nu_G_k.c_str(), G.k_length); } catch (std::exception& e) { - fmt::print(stderr, "{}", e.what()); + fmt::print(stderr, "{}\n", e.what()); } return r; }