subscribeInvalidMessageReceived method

void subscribeInvalidMessageReceived(
  1. dynamic callback(
    1. String,
    2. Exception
    )
)

Subscribes to all received messages which can't be parsed correctly (InvalidMessageReceived-Event).

The first passed String is the original message and the second one is the exception during the parsing process.

Implementation

void subscribeInvalidMessageReceived(Function(String, Exception) callback) {
  _callbacksForInvalidMessage.add(callback);
}