| 64 | } |
| 65 | |
| 66 | bl::result<std::shared_ptr<GSObject>> GetObject(const std::string& id) { |
| 67 | DLOG(INFO) << "[object manager] getting " << id; |
| 68 | if (objects.find(id) == objects.end()) { |
| 69 | RETURN_GS_ERROR(vineyard::ErrorCode::kInvalidOperationError, |
| 70 | "Object " + id + " does not exist"); |
| 71 | } |
| 72 | return objects[id]; |
| 73 | } |
| 74 | |
| 75 | template <typename T> |
| 76 | bl::result<std::shared_ptr<T>> GetObject(const std::string& id) { |