forked from github/wulkanowy-mirror
Add full stacktrace to errors list in sync now (#945)
This commit is contained in:
parent
18b9bf42e1
commit
debb21f5f9
@ -50,13 +50,16 @@ class SyncWorker @WorkerInject constructor(
|
|||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
Timber.w("${work::class.java.simpleName} result: An exception ${e.message} occurred")
|
Timber.w("${work::class.java.simpleName} result: An exception ${e.message} occurred")
|
||||||
if (e is FeatureDisabledException || e is FeatureNotAvailableException) null
|
if (e is FeatureDisabledException || e is FeatureNotAvailableException) null
|
||||||
else e
|
else {
|
||||||
|
Timber.e(e)
|
||||||
|
e
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val result = when {
|
val result = when {
|
||||||
exceptions.isNotEmpty() && inputData.getBoolean("one_time", false) -> {
|
exceptions.isNotEmpty() && inputData.getBoolean("one_time", false) -> {
|
||||||
Result.failure(Data.Builder()
|
Result.failure(Data.Builder()
|
||||||
.putString("error", exceptions.toString())
|
.putString("error", exceptions.map { it.stackTraceToString() }.toString())
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user