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

Method UnknownTrigger

include/Core/Triggers/Exceptions.hpp:44–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 {
43 public:
44 UnknownTrigger(std::string_view triggerNamespace, std::string_view triggerGroup,
45 std::string_view triggerName,
46 const std::vector<std::string>& existingTriggers, DebugInfo info)
47 : Exception("UnknownTrigger", info)
48 {
49 this->error("Unable to find a Trigger named '{}' inside TriggerGroup '{}.{}'",
50 triggerName, triggerNamespace, triggerGroup);
51 std::vector<std::string> suggestions
52 = Utils::String::sortByDistance(triggerName.data(), existingTriggers, 5);
53 std::transform(suggestions.begin(), suggestions.end(), suggestions.begin(),
54 Utils::String::quote);
55 this->hint("Try one of the following Triggers ({}...)",
56 fmt::join(suggestions, ", "));
57 }
58 };
59
60 class UnknownTriggerNamespace : 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