completeError method

void completeError (Object error, [ StackTrace stackTrace ])

Completes operation to error.

Implementation

void completeError(Object error, [StackTrace stackTrace]) {
  if (_isCompleted) throw new StateError("Operation already completed");
  _isCompleted = true;

  if (_isCanceled) return;
  _inner.completeError(error, stackTrace);
}