void addError(Object error, [ StackTrace stackTrace ])

Send or enqueue an error event.

If error is null, it is replaced by a NullThrownError.

Source

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