Kristian Nedrevold
10/16/2022, 10:24 AMKristian Nedrevold
10/16/2022, 7:00 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