Aller au contenu

Empty Catch Block (ARCH9150)

Ce contenu n’est pas encore disponible dans votre langue.

Key swift.logging.empty-catch-block · Severity error · Category logging

Flags catch blocks with no statements - the error disappears.

do { try save() } catch { }
do { try save() } catch { logger.error("save failed: \(error)"); throw error }

Log the error, rethrow, or document why ignoring is correct.