mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 04:13:53 +01:00
fail on demand
This commit is contained in:
parent
767ee24468
commit
6178819987
1 changed files with 3 additions and 0 deletions
|
|
@ -310,6 +310,9 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) :
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//Upload the file to stash
|
//Upload the file to stash
|
||||||
|
if (filename!!.contains("fail")) {
|
||||||
|
throw Exception("fake exception for tests");
|
||||||
|
}
|
||||||
val stashUploadResult = uploadClient.uploadFileToStash(
|
val stashUploadResult = uploadClient.uploadFileToStash(
|
||||||
filename!!, contribution, notificationProgressUpdater
|
filename!!, contribution, notificationProgressUpdater
|
||||||
).onErrorReturn{
|
).onErrorReturn{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue