reportSyncFault method

void reportSyncFault(
  1. SyncFault fault
)

Reports fault on faults and latches it on lastFault.

Reported on CRDTSocketClient.faults, never thrown: this runs inside the callback that reads the socket, where a throw reaches no catch and no onError and ends up as an uncaught error in the zone.

Implementation

void reportSyncFault(SyncFault fault) {
  _lastFault = fault;
  if (!_faults.isClosed) {
    _faults.add(fault);
  }
}