electrolobzik
01/25/2024, 8:59 PM// 4xx without errorCode
class UnknownClientRequestException(
message: String,
error: ClientRequestException
): RuntimeException(
message = "$message (server code: ${error.response.status.value}, message: ${error.response.status.description})",
cause = error
)
But I am getting compile time errors: Cannot find a parameter with this name: message
, Cannot find a parameter with this name: cause
What am I doing wrong?Adam S
01/25/2024, 10:08 PMelectrolobzik
01/26/2024, 8:42 AMexpect class
, how will be translated on other platforms? I see that Ktor also uses it as a base class for it’s own exceptions. If it is multiplatform class it is weird that I can’t use it in normal kotlin way.Adam S
01/26/2024, 1:18 PMactual typealias
, and in other targets it's an actual class
(e.g. on JS)
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-runtime-exception/electrolobzik
01/26/2024, 2:31 PM