Skip to content

Commit d1a9aaf

Browse files
committed
Throwing copy file error
1 parent 5a51b11 commit d1a9aaf

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

WordPress/src/main/java/org/wordpress/android/support/he/ui/HESupportViewModel.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,7 @@ class HESupportViewModel @Inject constructor(
156156

157157
@Suppress("TooGenericExceptionCaught")
158158
private suspend fun copyUrisToTempFiles(uris: List<Uri>): List<File> = withContext(ioDispatcher) {
159-
try {
160-
uris.mapNotNull { it.toTempFile() }
161-
} catch (e: Exception) {
162-
appLogWrapper.e(AppLog.T.SUPPORT, "Error copying URIs to temp files: ${e.stackTraceToString()}")
163-
emptyList()
164-
}
159+
uris.mapNotNull { it.toTempFile() }
165160
}
166161

167162
@Suppress("TooGenericExceptionCaught")
@@ -193,7 +188,7 @@ class HESupportViewModel @Inject constructor(
193188
tempFile
194189
} catch (e: Exception) {
195190
appLogWrapper.e(AppLog.T.SUPPORT, "Error copying URI to temp file: ${e.stackTraceToString()}")
196-
null
191+
throw e
197192
}
198193
}
199194
}

0 commit comments

Comments
 (0)