generate_random_data: return early on invalid arg
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
53cde1371f
commit
57fae8f582
|
@ -143,7 +143,10 @@ auto Generator::generate_random_data(uint n) -> std::string {
|
|||
// do not do this..?
|
||||
const std::string msg{"zero bytes requested, bailing\n"};
|
||||
fmt::print("[*] g: error: {}", msg);
|
||||
throw std::invalid_argument(msg);
|
||||
// throw std::invalid_argument(msg);
|
||||
// TODO(me): throw or not?
|
||||
// perhaps just return prematurely
|
||||
return "";
|
||||
}
|
||||
|
||||
// pre-computed 2^20
|
||||
|
|
Reference in New Issue