emitError method

void emitError(
  1. Object error, [
  2. StackTrace? stackTrace
])

Reports error on the socket, as a transport-level failure would.

Implementation

void emitError(Object error, [StackTrace? stackTrace]) {
  if (_incoming.isClosed) return;
  _incoming.addError(error, stackTrace ?? StackTrace.current);
}