Ir al contenido

Log And Rethrow (ARCH9166)

Esta página aún no está disponible en tu idioma.

Key swift.logging.log-and-rethrow · Severity warning · Category logging

Flags catch blocks that log the error and then throw it again.

catch { logger.error("\(error)"); throw error }
catch { throw UploadError.failed(underlying: error) }

Either log or rethrow; wrap with context if the caller needs it.