void addError(Object error, [ StackTrace stackTrace ])

Adds an error to the sink.

Must not be called on a closed sink.

Source

void addError(Object error, [StackTrace stackTrace]);