mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
replace assertion by exception
This commit is contained in:
parent
f402cdec5e
commit
135951f690
@ -533,8 +533,9 @@ void SerialContainerPrivate::pruneInterfaces(container_type::const_iterator firs
|
||||
// 1st sweep: remove push interfaces
|
||||
for (auto it = first; it != end; ++it) {
|
||||
StagePrivate* impl = (*it)->pimpl();
|
||||
// range should only contain stages with unknown required interface
|
||||
assert(impl->requiredInterface() == UNKNOWN);
|
||||
// the required interface should be a subset of the accepted one
|
||||
if ((impl->requiredInterface() & accepted) != impl->requiredInterface())
|
||||
throw InitStageException(*impl->me(), "Required interface not satisfied after pruning");
|
||||
|
||||
// remove push interfaces if not accepted
|
||||
if (!(accepted & WRITES_PREV_END))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user