Adds an error to the sink.
error
Must not be called on a closed sink.
void addError(Object error, [StackTrace stackTrace]);