MCPcopy Create free account
hub / github.com/bcndev/bytecoin / show_errors

Method show_errors

src/common/CommandLine.cpp:158–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158bool CommandLine::show_errors(const char *context) {
159 int errors = 0;
160 if (!positional_used)
161 for (auto &&po : positional) {
162 printf("Positional argument '%s' %s\n", po, context ? context : "are not allowed");
163 errors += 1;
164 }
165 for (auto &&op : options) {
166 if (!op.used) {
167 printf("Command line option %s %s\n", op.key.data,
168 !op.in_help ? "has no meaning (typo?)" : context ? context : "cannot be used in this context");
169 errors += 1;
170 }
171 if (op.wrong_type_message) {
172 printf("Command line option %s %s\n", op.key.data, op.wrong_type_message);
173 errors += 1;
174 }
175 }
176 return errors != 0;
177}
178
179static const char TOY_USAGE[] =
180 R"(toy <version>.

Callers 8

mainFunction · 0.80
mainFunction · 0.80
mainMethod · 0.80
create_mnemonicFunction · 0.80
check_mnemonicFunction · 0.80
create_walletFunction · 0.80
mainFunction · 0.80
toy_mainMethod · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64