if TryStrToInt(Edit1.Text, Value) then DoSomethingWithTheNumber(Value) else HandleNotANumberError(Edit1.Text);