addError method

  1. @override
void addError(
  1. Object error, [
  2. StackTrace stackTrace
])
override

Unsupported operation on sockets.

This method, which is inherited from IOSink, is not supported on sockets, and must not be called. Sockets have no way to report errors, so any error passed in to a socket using addError would be lost.

Implementation

@override
void addError(error, [StackTrace stackTrace]) {
  throw UnsupportedError("Cannot send errors on sockets");
}