diff --git a/include/ScalarAccessor.h b/include/ScalarAccessor.h index 17c812f4474174493959ecfd8d481d3c2aac9790..e4f2cff8af7edd09b0932f3f4f78d72a2d007515 100644 --- a/include/ScalarAccessor.h +++ b/include/ScalarAccessor.h @@ -115,8 +115,12 @@ namespace ChimeraTK { void useProcessVariable(const boost::shared_ptr<ProcessVariable> &var) { impl = boost::dynamic_pointer_cast< ProcessScalar<UserType> >(var); - if(!impl) { - throw std::string("ProcessVariable of the wrong type provided, cannot be used as the implementation!"); // @todo TODO throw proper exception + assert(impl); + if(Accessor<UserType>::getDirection() == VariableDirection::consuming) { + assert(impl->isReceiver()); + } + else { + assert(impl->isSender()); } }