pull/363/head
gedoor 5 years ago
parent 626ae94768
commit c83f25f8e7
  1. 8
      app/src/main/java/io/legado/app/utils/ThrowableExtensions.kt

@ -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
}
}
Loading…
Cancel
Save