A WHEN OTHERS handler neither raises the error again nor records it

tx0/sql:exception-swallowedrecommendedwarningreliability/error-handlingdepth fastbug

What it finds

A WHEN OTHERS handler that neither raises the error again nor records it anywhere: it may print it, but the caller goes on as if the work had succeeded. Raising again, or logging through a procedure or a table, keeps the failure visible.

Handlers made only of NULL are left to the rule for those.

From the rule's source, exception_swallowed.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:exception-swallowed" = "warning"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:exception-swallowed shows the same in the terminal. Found a false positive? Report it.