Kristian Nedrevold
10/16/2022, 10:24 AMRuckus
10/16/2022, 5:03 PMPair
?Kristian Nedrevold
10/16/2022, 7:00 PMRuckus
10/16/2022, 8:26 PMStarr
10/17/2022, 6:42 PMjanvladimirmostert
10/23/2022, 6:22 AMsealed interface Blah {
data class Success(val id: String) : Blah
data class Error1(override val message: String) : Exception(message), Blah {
override fun fillInStackTrace(): Throwable = this
}
data class Error2(override val message: String) : Exception(message), Blah {
override fun fillInStackTrace(): Throwable = this
}
}
and if you override the fillInStackTrace, you avoid the performance penalty of Exceptions