MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / UnknownInputButton

Class UnknownInputButton

include/Core/Input/Exceptions.hpp:52–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 };
51
52 class UnknownInputButton : public Exception
53 {
54 public:
55 UnknownInputButton(std::string_view buttonName,
56 const std::vector<std::string>& existingButtons, DebugInfo info)
57 : Exception("UnknownInputButton", info)
58 {
59 this->error("InputButton named '{}' does not exists", buttonName);
60 std::vector<std::string> suggestions
61 = Utils::String::sortByDistance(buttonName.data(), existingButtons, 5);
62 std::transform(suggestions.begin(), suggestions.end(), suggestions.begin(),
63 &Utils::String::quote);
64 this->hint("Try one of the following InputButton : ({}...)",
65 fmt::join(suggestions, ", "));
66 }
67 };
68
69 class InvalidInputCombinationCode : public Exception
70 {

Callers 2

InputManager.cppFile · 0.85
makeCombinationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected