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

Class UnknownSprite

include/Core/Scene/Exceptions.hpp:64–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 };
63
64 class UnknownSprite : public Exception
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
83 {

Callers 1

Scene.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected