mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
add catch-rethrow for property initialization
The property doesn't know its own name, so we add it here
This commit is contained in:
parent
78b86bb65f
commit
30de5e1a8c
@ -147,7 +147,12 @@ void PropertyMap::configureInitFrom(Property::SourceId source, const std::set<st
|
|||||||
{
|
{
|
||||||
for (auto &pair : props_) {
|
for (auto &pair : props_) {
|
||||||
if (properties.empty() || properties.count(pair.first))
|
if (properties.empty() || properties.count(pair.first))
|
||||||
pair.second.configureInitFrom(source, std::bind(&fromName, std::placeholders::_1, pair.first));
|
try {
|
||||||
|
pair.second.configureInitFrom(source, std::bind(&fromName, std::placeholders::_1, pair.first));
|
||||||
|
} catch (Property::error& e) {
|
||||||
|
e.setName(pair.first);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user