mirror of
https://github.com/monero-project/monero.git
synced 2025-12-25 12:25:18 -08:00
Update error messages in daemon
When given a wrong argument, some daemon commands failed with "unknown command" error, instead of a meaningful error message. This patch brings consistency into the error messages. In several places, this patch removes relatively useful messages, and replaces them with more generic ones. E.g., - std::cout << "use: print_pl [white] [gray] [<limit>] [pruned] [publicrpc]" << std::endl; + std::cout << "Invalid syntax: Too many parameters. For more details, use the help command." << std::endl; There are two reasons for this: 1. Consistency. 2. Removing duplicates. The detailed information about the parameters is present in the help messages already. Having it in two places increases the risk that the messages would get out of date.
This commit is contained in:
@@ -217,7 +217,8 @@ t_command_server::t_command_server(
|
||||
m_command_lookup.set_handler(
|
||||
"hard_fork_info"
|
||||
, std::bind(&t_command_parser_executor::hard_fork_info, &m_parser, p::_1)
|
||||
, "Print the hard fork voting information."
|
||||
, "hard_fork_info <version>"
|
||||
, "Print the hard fork voting information. If given a version, prints whether is this version enabled."
|
||||
);
|
||||
m_command_lookup.set_handler(
|
||||
"bans"
|
||||
@@ -308,6 +309,7 @@ t_command_server::t_command_server(
|
||||
m_command_lookup.set_handler(
|
||||
"prune_blockchain"
|
||||
, std::bind(&t_command_parser_executor::prune_blockchain, &m_parser, p::_1)
|
||||
, "prune_blockchain [confirm]"
|
||||
, "Prune the blockchain."
|
||||
);
|
||||
m_command_lookup.set_handler(
|
||||
|
||||
Reference in New Issue
Block a user