From 8629ee80d9b3c29bf3a2d13ccaca12bf473635fc Mon Sep 17 00:00:00 2001 From: "fabian.peller-konrad@kit.edu" <fabian.peller-konrad@kit.edu> Date: Thu, 24 Jun 2021 13:29:20 +0200 Subject: [PATCH] fixed build issues with updated exception constructors --- .../libraries/armem/core/base/CoreSegmentBase.h | 2 +- .../libraries/armem/core/base/EntityBase.h | 14 +++++++------- .../libraries/armem/core/longtermmemory/Entity.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h b/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h index 57b1816f5..eefb1b5ce 100644 --- a/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h +++ b/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h @@ -169,7 +169,7 @@ namespace armarx::armem::base } else { - throw armem::error::MissingEntry("provider segment", update.entityID.providerSegmentName, getLevelName(), this->getKeyString()); + throw error::MissingEntry::create<EntitySnapshotT>(update.entityID.providerSegmentName, *this); } } else diff --git a/source/RobotAPI/libraries/armem/core/base/EntityBase.h b/source/RobotAPI/libraries/armem/core/base/EntityBase.h index 584ee9c87..ab227c33e 100644 --- a/source/RobotAPI/libraries/armem/core/base/EntityBase.h +++ b/source/RobotAPI/libraries/armem/core/base/EntityBase.h @@ -234,7 +234,7 @@ namespace armarx::armem::base { return refIt->second; } - throw error::MissingEntry("entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } // last element less than @@ -246,7 +246,7 @@ namespace armarx::armem::base return refItPrev->second; } - throw error::MissingEntry("entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } /** @@ -263,7 +263,7 @@ namespace armarx::armem::base if (refIt == this->_container.begin()) { - throw error::MissingEntry("entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } // last element less than @@ -275,7 +275,7 @@ namespace armarx::armem::base return refItPrev->second; } - throw error::MissingEntry("entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } /** @@ -315,7 +315,7 @@ namespace armarx::armem::base if (refIt == this->_container.end()) { - throw error::MissingEntry("entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } return refIt->second; } @@ -334,7 +334,7 @@ namespace armarx::armem::base if (refIt == this->_container.end()) { - throw error::MissingEntry("entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } if (refIt->first > time) @@ -350,7 +350,7 @@ namespace armarx::armem::base return refItNext->second; } - throw error::MissingEntry("entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } diff --git a/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp b/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp index a2e68a9e2..56a9e5142 100644 --- a/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp +++ b/source/RobotAPI/libraries/armem/core/longtermmemory/Entity.cpp @@ -133,7 +133,7 @@ namespace armarx::armem::ltm { if (!hasSnapshot(time)) { - throw error::MissingEntry("ltm entity snapshot", toDateTimeMilliSeconds(time), getLevelName(), this->id().str()); + throw error::MissingEntry::create<EntitySnapshotT>(toDateTimeMilliSeconds(time), *this); } // the above command already puts the reference to the cache -- GitLab