From 10199c816a5e33cbdff2a5e36e3ba4cb7d3609aa Mon Sep 17 00:00:00 2001 From: "mohamad.jaara" Date: Mon, 13 Nov 2023 12:39:24 +0100 Subject: [PATCH] refactor: add more info to generic core failure logs --- .../commonMain/kotlin/com/wire/kalium/logic/CoreFailure.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logic/src/commonMain/kotlin/com/wire/kalium/logic/CoreFailure.kt b/logic/src/commonMain/kotlin/com/wire/kalium/logic/CoreFailure.kt index c31e693db7a..09304970d32 100644 --- a/logic/src/commonMain/kotlin/com/wire/kalium/logic/CoreFailure.kt +++ b/logic/src/commonMain/kotlin/com/wire/kalium/logic/CoreFailure.kt @@ -208,7 +208,11 @@ sealed class EncryptionFailure : CoreFailure.FeatureFailure() { sealed class StorageFailure : CoreFailure { data object DataNotFound : StorageFailure() - data class Generic(val rootCause: Throwable) : StorageFailure() + data class Generic(val rootCause: Throwable) : StorageFailure() { + override fun toString(): String { + return "Generic(rootCause = ${rootCause.stackTraceToString()})" + } + } } private const val SOCKS_EXCEPTION = "socks"