missing docs on builder#addErrors

This commit is contained in:
Sergey Chernov 2024-06-17 10:49:01 +07:00
parent 38d800c7ac
commit 4f6bc3c77e

View File

@ -112,6 +112,17 @@ class KiloClient<S>(
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
}