pull/1827/head
kunfei 3 years ago
parent 43e458656a
commit 3f69b3533a
  1. 3
      app/src/main/java/io/legado/app/help/storage/Backup.kt
  2. 8
      app/src/main/java/io/legado/app/lib/webdav/WebDav.kt

@ -3,6 +3,7 @@ package io.legado.app.help.storage
import android.content.Context
import android.net.Uri
import androidx.documentfile.provider.DocumentFile
import io.legado.app.constant.AppLog
import io.legado.app.constant.PreferKey
import io.legado.app.data.appDb
import io.legado.app.help.config.ReadBookConfig
@ -54,6 +55,8 @@ object Backup {
} else {
context.putPrefLong(PreferKey.lastBackup, System.currentTimeMillis())
}
}.onError {
AppLog.put("自动备份失败\n${it.localizedMessage}")
}
}
}

@ -214,9 +214,7 @@ class WebDav(urlStr: String, val authorization: Authorization) {
checkResult(it)
}
}.onFailure {
val message = "WebDav上传失败\n${it.localizedMessage}"
AppLog.put(message)
throw NoStackTraceException(message)
throw NoStackTraceException("WebDav上传失败\n${it.localizedMessage}")
}
}
@ -234,9 +232,7 @@ class WebDav(urlStr: String, val authorization: Authorization) {
checkResult(it)
}
}.onFailure {
val message = "WebDav上传失败\n${it.localizedMessage}"
AppLog.put(message)
throw NoStackTraceException(message)
throw NoStackTraceException("WebDav上传失败\n${it.localizedMessage}")
}
}

Loading…
Cancel
Save