Skip to content

Commit d75c3a6

Browse files
author
Melissa Mazura
committed
refactor: change type of exceptionMessage to string
1 parent 0f99a9f commit d75c3a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/src/main/java/fr/free/nrw/commons/contributions/Contribution.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ data class Contribution constructor(
3030
var chunkInfo: ChunkInfo? = null,
3131
// add error message to keep track of error message for failed upload
3232
var errorMessage: String? = null,
33-
var exceptionMessage: Exception? = null,
33+
var exceptionMessage: String? = null,
3434
/**
3535
* @return array list of entityids for the depictions
3636
*/

app/src/main/java/fr/free/nrw/commons/upload/worker/UploadWorker.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) :
407407
if (contribution.errorMessage == null) {
408408
contribution.errorMessage = "upload from stash failed with exception"
409409
}
410-
contribution.exceptionMessage = exception
410+
contribution.exceptionMessage = exception.toString()
411411
Timber.e(exception)
412412
Timber.e("Upload from stash failed for contribution : $filename")
413413
showFailedNotification(contribution)
@@ -446,7 +446,7 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) :
446446
if (contribution.errorMessage == null) {
447447
contribution.errorMessage = "upload to stash failed with exception"
448448
}
449-
contribution.exceptionMessage = exception
449+
contribution.exceptionMessage = exception.toString()
450450
Timber.e(exception)
451451
Timber.e("Stash upload failed for contribution: $filename")
452452
showFailedNotification(contribution)

0 commit comments

Comments
 (0)