Back

LL018

StrToInt without TryStrToInt

Object Pascal — Delphi & Free Pascal
Warning
Reliability

Parsing failures via exceptions create brittle control flow and runtime faults

parsing failures via exceptions create brittle control flow and runtime faults.

Why this severity

parsing failures via exceptions create brittle control flow and runtime faults.


Known false positives

validated input where failure is provably impossible.

Remediation example

if not TryStrToInt(Input, Value) then
  Value := 0;

Reconnecting… Connection lost. Reload