MCPcopy Create free account
hub / github.com/daniele77/cli / WrongCommandHandler

Method WrongCommandHandler

include/cli/cli.h:174–177  ·  view source on GitHub ↗

* @brief Add an handler that will be called when the user enter a wrong command (not existing command or having wrong parameters). * If an handler is not set, the library will print the message "wrong command" on the console. * * @param handler the function to be called when the user enter a wrong command, taking a @c std::ostream& parameter to write on that session con

Source from the content-addressed store, hash-verified

172 * and the command entered.
173 */
174 void WrongCommandHandler(const std::function< void(std::ostream&, const std::string& cmd) >& handler)
175 {
176 wrongCmdHandler = handler;
177 }
178
179 /**
180 * @brief Get a global out stream object that can be used to print on every session currently connected (local and remote)

Callers 2

mainFunction · 0.80
FeedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected