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

Class UnknownGameObject

include/Core/Scene/Exceptions.hpp:32–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 };
31
32 class UnknownGameObject : public Exception
33 {
34 public:
35 UnknownGameObject(std::string_view sceneFile, std::string_view objectId,
36 const std::vector<std::string>& allObjectIds, DebugInfo info)
37 : Exception("UnknownGameObject", info)
38 {
39 this->error("GameObject with id '{}' does not exists inside Scene '{}'",
40 objectId, sceneFile);
41 std::vector<std::string> suggestions
42 = Utils::String::sortByDistance(objectId.data(), allObjectIds, 5);
43 std::transform(suggestions.begin(), suggestions.end(), suggestions.begin(),
44 Utils::String::quote);
45 this->hint("Try one of the GameObjects with id ({}...)",
46 fmt::join(suggestions, ", "));
47 }
48 };
49
50 class GameObjectAlreadyExists : public Exception
51 {

Callers 1

Scene.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected