Line data Source code
1 : /*
2 : * Package : mqtt_client
3 : * Author : S. Hamblett <steve.hamblett@linux.com>
4 : * Date : 31/05/2017
5 : * Copyright : S.Hamblett
6 : */
7 :
8 : part of mqtt_client;
9 :
10 : /// Exception that is thrown when the payload of a message is not the correct size.
11 : class InvalidPayloadSizeException implements Exception {
12 : String _message;
13 :
14 2 : InvalidPayloadSizeException(int size, int max) {
15 2 : _message =
16 : "mqtt-client::InvalidPayloadSizeException: The size of the payload ($size bytes) must "
17 2 : "be equal to or greater than 0 and less than $max bytes";
18 : }
19 :
20 : @override
21 1 : String toString() => _message;
22 : }
|