优化
This commit is contained in:
@@ -54,6 +54,7 @@ object CronetLoader : CronetEngine.Builder.LibraryLoader() {
|
||||
/**
|
||||
* 判断Cronet是否安装完成
|
||||
*/
|
||||
@Synchronized
|
||||
fun install(): Boolean {
|
||||
if (cacheInstall) {
|
||||
return true
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package io.legado.app.utils
|
||||
|
||||
import java.io.IOException
|
||||
|
||||
val Throwable.msg: String
|
||||
get() {
|
||||
val stackTrace = stackTraceToString()
|
||||
@@ -8,4 +10,10 @@ val Throwable.msg: String
|
||||
stackTrace.isNotEmpty() -> stackTrace
|
||||
else -> lMsg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Throwable.rethrowAsIOException(): IOException {
|
||||
val newException = IOException(this.message)
|
||||
newException.initCause(this)
|
||||
throw newException
|
||||
}
|
||||
Reference in New Issue
Block a user