If you fancy that an error could be just a type, not necessarily a Throwable, you might like Result4k - it offers a Result<T,E>
https://github.com/fork-handles/forkhandles/tree/trunk/resul...
disclaimer: I contribute to this.
We currently use https://github.com/michaelbull/kotlin-result , which officially should work on KMP, but has some issues.
We currently use https://github.com/michaelbull/kotlin-result , which officially should work on KMP, but has some issues.