Update error messages

This commit is contained in:
Koitharu
2023-08-14 09:44:02 +03:00
parent 7dbec8eb8f
commit 9eace89d4f
3 changed files with 4 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ import org.koitharu.kotatsu.core.exceptions.CaughtException
import org.koitharu.kotatsu.core.exceptions.CloudFlareProtectedException
import org.koitharu.kotatsu.core.exceptions.EmptyHistoryException
import org.koitharu.kotatsu.core.exceptions.SyncApiException
import org.koitharu.kotatsu.core.exceptions.TooManyRequestExceptions
import org.koitharu.kotatsu.core.exceptions.UnsupportedFileException
import org.koitharu.kotatsu.core.exceptions.WrongPasswordException
import org.koitharu.kotatsu.parsers.exception.AuthRequiredException
@@ -32,6 +33,7 @@ fun Throwable.getDisplayMessage(resources: Resources): String = when (this) {
is UnsupportedOperationException,
-> resources.getString(R.string.operation_not_supported)
is TooManyRequestExceptions -> resources.getString(R.string.too_many_requests_message)
is UnsupportedFileException -> resources.getString(R.string.text_file_not_supported)
is FileNotFoundException -> resources.getString(R.string.file_not_found)
is AccessDeniedException -> resources.getString(R.string.no_access_to_file)

View File

@@ -473,4 +473,5 @@
<string name="unknown">Unknown</string>
<string name="in_progress">In progress</string>
<string name="disable_nsfw">Disable NSFW</string>
<string name="too_many_requests_message">Too many requests. Try again later</string>
</resources>