Send the right exception to TimelineTab

This commit is contained in:
Shinokuni 2024-08-19 17:38:04 +02:00
parent 6d55c3200a
commit adb2b0c192

View File

@ -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()