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

Method UnknownSprite

include/Core/Scene/Exceptions.hpp:67–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 {
66 public:
67 UnknownSprite(std::string_view sceneFile, std::string_view spriteId,
68 const std::vector<std::string>& allSpritesIds, DebugInfo info)
69 : Exception("UnknownSprite", info)
70 {
71 this->error("Sprite with id '{}' does not exists inside Scene '{}'", spriteId,
72 sceneFile);
73 std::vector<std::string> suggestions
74 = Utils::String::sortByDistance(spriteId.data(), allSpritesIds, 5);
75 std::transform(suggestions.begin(), suggestions.end(), suggestions.begin(),
76 Utils::String::quote);
77 this->hint(
78 "Try one of the Sprites with id ({}...)", fmt::join(suggestions, ", "));
79 }
80 };
81
82 class UnknownCollider : 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