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) {
|
||||
Timber.w("${work::class.java.simpleName} result: An exception ${e.message} occurred")
|
||||
if (e is FeatureDisabledException || e is FeatureNotAvailableException) null
|
||||
else e
|
||||
else {
|
||||
Timber.e(e)
|
||||
e
|
||||
}
|
||||
}
|
||||
}
|
||||
val result = when {
|
||||
exceptions.isNotEmpty() && inputData.getBoolean("one_time", false) -> {
|
||||
Result.failure(Data.Builder()
|
||||
.putString("error", exceptions.toString())
|
||||
.putString("error", exceptions.map { it.stackTraceToString() }.toString())
|
||||
.build()
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user