Sync fixes

This commit is contained in:
Koitharu
2022-07-19 14:31:25 +03:00
parent 57c1d070d1
commit 59243be030
5 changed files with 40 additions and 21 deletions

View File

@@ -19,6 +19,7 @@ fun Throwable.getDisplayMessage(resources: Resources): String = when (this) {
is UnsupportedFileException -> resources.getString(R.string.text_file_not_supported)
is FileNotFoundException -> resources.getString(R.string.file_not_found)
is EmptyHistoryException -> resources.getString(R.string.history_is_empty)
is SyncApiException,
is ContentUnavailableException -> message
is ParseException -> shortMessage
is SocketTimeoutException -> resources.getString(R.string.network_error)
@@ -36,4 +37,4 @@ fun Throwable.isReportable(): Boolean {
fun Throwable.report(message: String?) {
CaughtException(this, message).sendWithAcra()
}
}