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 }