Why this matters
Hidden failures corrupt state and break retries/alerts.
Never swallow exceptions silently; wrap with context and rethrow or translate to a domain exception.
Hidden failures corrupt state and break retries/alerts.
Side-by-side examples engineers can pattern-match during review.
try { doWork(); } catch (IOException e) { /* ignore */ }try { doWork(); } catch (IOException e) { throw new UncheckedIOException("doWork failed", e); }catch(Exception e){}catch(Exception e){ throw new RuntimeException("context", e); }From the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.