Eivind
12/29/2021, 9:03 AMError
that I want to use to represents errors occuring in my api (not exceptions, but state different than what the user expected when they made their request). When I use it now Kotlin defaults to the java.lang.Error.
Can I change this default, or should I pick a different name?Minsoo Cheong
12/29/2021, 9:46 AM@SinceKotlin("1.1") public actual typealias Error = java.lang.Error
this typealias exists in the kotlin stdlib TypeAliases.kt file
I think that picking a different name would be the easiest way, if keeping your class name isn't that importantEivind
12/29/2021, 9:48 AMApiError
. Not ideal, but close enough until something better. Thanks.Max Ferrier
12/29/2021, 11:34 AMEivind
12/29/2021, 1:17 PMSuccess
and Error
in a sealed class Outcome
, but I figured the vavr.io library has better support for all the functions I'd have to implement on my Outcome class anyway (fold, map, mapleft, flatmap etc), so I just started using that insteadTies
12/29/2021, 3:25 PMEivind
12/29/2021, 3:32 PMTies
12/29/2021, 3:40 PMEivind
12/29/2021, 3:47 PMOptics
data type??? what on earth.. š¤)Ties
12/29/2021, 3:49 PM