30 #include <boost/format.hpp>
38 InformerBase::InformerBase(
39 const vector<transport::OutConnectorPtr>& connectors,
41 const string& defaultType) :
42 Participant(scope, config), defaultType(defaultType),
43 currentSequenceNumber(0) {
46 for (vector<transport::OutConnectorPtr>::const_iterator it =
47 connectors.begin(); it != connectors.end(); ++it) {
98 if (event->getType().empty()) {
99 throw invalid_argument(
101 boost::format(
"Event type cannot be empty: %1%")
106 throw invalid_argument(
109 "Specified event type %1% does not match informer type %2%.")
110 % event->getType() %
getType()));
113 if (*event->getScopePtr() != *
getScope() && !
event->getScopePtr()->isSubScopeOf(
115 throw invalid_argument(
118 "Specified event scope %1% does not match informer scope %2%.")
119 % event->getScopePtr() %
getScope()));