Send the right exception to TimelineTab
This commit is contained in:
parent
6d55c3200a
commit
adb2b0c192
@ -94,13 +94,13 @@ class SyncWorker(
|
|||||||
|
|
||||||
workResult
|
workResult
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "${e::class.simpleName}: ${e.message} ${e.printStackTrace()}")
|
Log.e(TAG, "${e.printStackTrace()}")
|
||||||
|
|
||||||
notificationManager.cancel(SYNC_NOTIFICATION_ID)
|
notificationManager.cancel(SYNC_NOTIFICATION_ID)
|
||||||
if (isManual) {
|
if (isManual) {
|
||||||
Result.failure(
|
Result.failure(
|
||||||
workDataOf(SYNC_FAILURE_KEY to true)
|
workDataOf(SYNC_FAILURE_KEY to true)
|
||||||
.putSerializable(SYNC_FAILURE_EXCEPTION_KEY, e)
|
.putSerializable(SYNC_FAILURE_EXCEPTION_KEY, Exception(e.cause))
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Result.failure()
|
Result.failure()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user