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

Method UnknownInputButton

include/Core/Input/Exceptions.hpp:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

sortByDistanceFunction · 0.85
joinFunction · 0.50
errorMethod · 0.45
dataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
hintMethod · 0.45

Tested by

no test coverage detected