The SyncException wrap/unwrap logic was made when we didn't have coroutines (with coroutine context) yet and Apache Commons ExceptionContext (which we had before) hadn't provided enough flexibility anymore.
Since we want consequent coroutines for the sync algorithm anyway (see also #1808), we can probably use coroutine contexts to replace the whole SyncException logic.
We should also work in direction of refactoring the sync-algorithm into clear well-testable steps (which probably run in their own class, maybe like the operation pattern used for WebDAV). As a first step, we should get rid of the download queue that's managed within syncRemote (including the inline fun download).
#1808 should probably be done first.
The
SyncExceptionwrap/unwrap logic was made when we didn't have coroutines (with coroutine context) yet and Apache Commons ExceptionContext (which we had before) hadn't provided enough flexibility anymore.Since we want consequent coroutines for the sync algorithm anyway (see also #1808), we can probably use coroutine contexts to replace the whole
SyncExceptionlogic.We should also work in direction of refactoring the sync-algorithm into clear well-testable steps (which probably run in their own class, maybe like the operation pattern used for WebDAV). As a first step, we should get rid of the download queue that's managed within
syncRemote(including the inlinefun download).#1808 should probably be done first.