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

Class UnknownTrigger

include/Core/Triggers/Exceptions.hpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 };
40
41 class UnknownTrigger : public Exception
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
61 {

Callers 2

getMethod · 0.85
TriggerGroup.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected