Cancellation Swallowed (ARCH9168)
Esta página aún no está disponible en tu idioma.
Key swift.logging.cancellation-swallowed · Severity warning · Category logging
Flags catch-all blocks in async functions that do not rethrow CancellationError - the task keeps running after cancel.
Incorrect
Section titled “Incorrect”catch { logger.error("failed") }Correct
Section titled “Correct”catch is CancellationError { throw error } catch { ... }Rethrow CancellationError (or check Task.isCancelled) before handling other errors.