Empty Catch Block (ARCH9150)
Key swift.logging.empty-catch-block · Severity error · Category logging
Flags catch blocks with no statements - the error disappears.
Incorrect
Section titled “Incorrect”do { try save() } catch { }Correct
Section titled “Correct”do { try save() } catch { logger.error("save failed: \(error)"); throw error }Log the error, rethrow, or document why ignoring is correct.