@ -2,8 +2,10 @@ package io.legado.app.utils
val Throwable.msg: String
get() {
val lMsg = this.localizedMessage
return if (lMsg.isNullOrEmpty()) this.stackTraceToString() else {
lMsg
val stackTrace = stackTraceToString()
val lMsg = this.localizedMessage ?: "noErrorMsg"
return when {
stackTrace.isNotEmpty() -> stackTrace
else -> lMsg
}