aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_server.cpp
diff options
context:
space:
mode:
authorTadeas Moravec <tadeas@moravec.xyz>2020-09-18 14:04:19 +0200
committerTadeas Moravec <tadeas@moravec.xyz>2020-09-18 14:04:19 +0200
commit83da867474ea076c136123684acd6a92abcd3f55 (patch)
tree3cb0b4767c734e449e571e6a1e150785535b69b6 /src/daemon/command_server.cpp
parentMerge pull request #6582 (diff)
downloadmonero-83da867474ea076c136123684acd6a92abcd3f55.tar.xz
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.
Diffstat (limited to 'src/daemon/command_server.cpp')
-rw-r--r--src/daemon/command_server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp
index 7fae77c30..0ab6ec800 100644
--- a/src/daemon/command_server.cpp
+++ b/src/daemon/command_server.cpp
@@ -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(