refactor: Improve error message handling in GoogleDriveSyncService
This commit is contained in:
parent
f24c101d78
commit
159d5e31d7
2 changed files with 4 additions and 4 deletions
|
|
@ -154,11 +154,11 @@ class GoogleDriveSyncService(context: Context, json: Json, syncPreferences: Sync
|
|||
|
||||
if (retries >= maxRetries) {
|
||||
logcat(LogPriority.ERROR) { "Max retries reached, exiting sync process" }
|
||||
throw Exception(context.stringResource(SYMR.strings.error_before_sync_gdrive) + ": Max retries reached.")
|
||||
throw Exception(context.stringResource(SYMR.strings.error_before_sync_gdrive, "Max retries reached."))
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logcat(LogPriority.ERROR, throwable = e) { "Error in GoogleDrive beforeSync" }
|
||||
throw Exception(context.stringResource(SYMR.strings.error_before_sync_gdrive) + ": ${e.message}", e)
|
||||
throw Exception(context.stringResource(SYMR.strings.error_before_sync_gdrive, e.message ?: "Exception"), e)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1962,8 +1962,8 @@
|
|||
<ID>TooGenericExceptionThrown:EHentai.kt$EHentai$throw Exception(it.text())</ID>
|
||||
<ID>TooGenericExceptionThrown:ExtensionLoader.kt$ExtensionLoader$throw Exception("Unknown source class type: ${obj.javaClass}")</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveService$throw Exception(context.stringResource(MR.strings.google_drive_not_signed_in))</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_before_sync_gdrive) + ": ${e.message}", e)</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_before_sync_gdrive) + ": Max retries reached.")</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_before_sync_gdrive, e.message ?: "Exception"), e)</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_before_sync_gdrive, "Max retries reached."))</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_deleting_google_drive_lock_file), e)</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_uploading_sync_data) + ": ${e.message}", e)</ID>
|
||||
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.google_drive_not_signed_in))</ID>
|
||||
|
|
|
|||
Loading…
Reference in a new issue