Improve error message returned to user on invalid input (uint64)
In some cta-admin
sub-commands, when sending a wrong input type, we get a message like is not a valid uint64
.
Instead, we should return something more user-friendly, such as is not a valid unsigned integer
. This is already done is some situations.
Example:
[root@ctacli /]# cta-admin mp ch --ap a
a is not a valid uint64: [--archivepriority/--ap <priority_value>]
This is coded in:
cmdline/CtaAdminCmd.cpp#466: throw std::runtime_error(value + " is not a valid uint64: " + option.help());
cmdline/CtaAdminGrpcCmd.cpp#289: throw std::runtime_error(strValue + " is not a valid uint64: " + option.help());
For more details check: