validateMaxLength static method
Validates that the topic does not exceed the maximum length. topicInstance - The instance to check.
Implementation
static void validateMaxLength(Topic topicInstance) {
if (topicInstance.rawTopic.length > maxTopicLength) {
throw Exception('mqtt_client::Topic: The length of the supplied rawTopic '
'(${topicInstance.rawTopic.length}) is longer than the '
'maximum allowable ($maxTopicLength)');
}
}