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

Method UnknownInputAction

include/Core/Input/Exceptions.hpp:38–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 {
37 public:
38 UnknownInputAction(std::string_view actionName,
39 const std::vector<std::string>& existingActions, DebugInfo info)
40 : Exception("UnknownInputAction", info)
41 {
42 this->error("InputAction named '{}' does not exists", actionName);
43 std::vector<std::string> suggestions
44 = Utils::String::sortByDistance(actionName.data(), existingActions, 5);
45 std::transform(suggestions.begin(), suggestions.end(), suggestions.begin(),
46 Utils::String::quote);
47 this->hint("Try one of the following InputAction : ({}...)",
48 fmt::join(suggestions, ", "));
49 }
50 };
51
52 class UnknownInputButton : 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