From 4f6bc3c77e1a395c1e757509d9f6e5a9e1c9aca6 Mon Sep 17 00:00:00 2001 From: sergeych Date: Mon, 17 Jun 2024 10:49:01 +0700 Subject: [PATCH] missing docs on builder#addErrors --- .../kotlin/net/sergeych/kiloparsec/KiloClient.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/commonMain/kotlin/net/sergeych/kiloparsec/KiloClient.kt b/src/commonMain/kotlin/net/sergeych/kiloparsec/KiloClient.kt index 0b31cad..6b82ae2 100644 --- a/src/commonMain/kotlin/net/sergeych/kiloparsec/KiloClient.kt +++ b/src/commonMain/kotlin/net/sergeych/kiloparsec/KiloClient.kt @@ -112,6 +112,17 @@ class KiloClient( interfaceBuilder = f } + /** + * Import exception (error) registrations from a shared LocalInterface (usually, server side one) to + * DRY error registration on both server and client sides. + * Normally you need to: + * + * - Register all your errors in server's LocalInterface + * + * - In the client builder call [addErrors(serverLocalInterface] + * + * See also [LocalInterface.registerError] for exception registration + */ fun addErrors(from: LocalInterface<*>) { errorProviders += from }