45 :
Exception(message), _topic(topic), _expectedMessage(expectedMessage), _actualMessage(actualMessage) { }
54 return _expectedMessage.c_str();
64 return _actualMessage.c_str();
74 return _topic.c_str();
const char * topic() const
Get the actual message type.
MessageMismatchException(const char *message, const std::string &topic, const std::string &expectedMessage, const std::string &actualMessage)
Constructor.
Exception base class for swarmros exceptions.
std::string _actualMessage
The actual type of the variant.
const char * actual_message() const
Get the actual message type.
const char * expected_message() const
Get the expected message type.
Exception thrown when the expected type of a message does not match the actual type.
std::string _expectedMessage
The expected type of the variant.