onError<T> method
Called when an error is reported via Shard.addError.
shard is the shard instance that reported the error.
error is the error object.
stackTrace is the optional stack trace associated with the error.
Implementation
@override
void onError<T>(Shard<T> shard, Object error, StackTrace? stackTrace) {
_errors.add(ObservedError(shard, error, stackTrace));
}