Skip to content

UNI014: Catch-all exception without rethrow

What and why

catch (Exception) without rethrow or when filter.

Broad catches hide failures and complicate recovery.

How to fix: catch specific types, add when filters, or rethrow with context.

Fix guidance

Catch specific exception types or rethrow with context.

Tags

reliability, exceptions

Suppression

Use // unilyze-disable-next-line UNI014 -- reason immediately before the reported line. These detector findings are line-based, so separate overload occurrences can be suppressed independently. For project-wide suppression, use "rules": { "UNI014": "off" }; use a baseline to freeze existing findings while reporting new ones.