Back

LL008

Empty except block

Object Pascal — Delphi & Free Pascal
Warning
Reliability

Swallowing exceptions hides failures and complicates recovery

swallowing exceptions hides failures and complicates recovery.

Why this severity

swallowing exceptions hides failures and complicates recovery.


Known false positives

deliberate best-effort cleanup where failures are intentionally ignored.

Remediation example

try
  DoWork;
except
  on E: Exception do
    LogError(E.Message);
end;

Reconnecting… Connection lost. Reload