copy

fun copy(code: YorkieException.Code = this.code, errorMessage: String = this.errorMessage): YorkieException

Returns a plain YorkieException with the given code and errorMessage, each defaulting to this instance's own value. Unlike a data class's generated copy, this always constructs the base YorkieException type, even when called on a subclass such as ChangeApplyError (documented divergence, see the class KDoc above).