From 135951f69083fc475d525b5bf3e98e4620b47f46 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 2 May 2019 18:07:44 +0200 Subject: [PATCH] replace assertion by exception --- core/src/container.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/container.cpp b/core/src/container.cpp index 0f7d6d9a..0e3924b0 100644 --- a/core/src/container.cpp +++ b/core/src/container.cpp @@ -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))