| 58 | }; |
| 59 | |
| 60 | class UnknownTriggerNamespace : public Exception |
| 61 | { |
| 62 | public: |
| 63 | UnknownTriggerNamespace(std::string_view triggerNamespace, |
| 64 | const std::vector<std::string>& existingNamespaces, DebugInfo info) |
| 65 | : Exception("UnknownTriggerNamespace", info) |
| 66 | { |
| 67 | this->error("Unable to find a TriggerNamespace named '{}'", triggerNamespace); |
| 68 | std::vector<std::string> suggestions = Utils::String::sortByDistance( |
| 69 | triggerNamespace.data(), existingNamespaces, 5); |
| 70 | std::transform(suggestions.begin(), suggestions.end(), suggestions.begin(), |
| 71 | Utils::String::quote); |
| 72 | this->hint("Try one of the following TriggerNamespaces ({}...)", |
| 73 | fmt::join(suggestions, ", ")); |
| 74 | } |
| 75 | }; |
| 76 | |
| 77 | class UnknownTriggerGroup : public Exception |
| 78 | { |
no outgoing calls
no test coverage detected