SL := TStringList.Create;
try
try
SL.LoadFromFile('D:\DATAFILE.DAT');

for I:=0 to SL.Count -1 do
begin
try
SetValue( StrToInt(SL[I]) );
except
PutError(IntToStr(I)+'行は変換できませんでした');
end;
end;
except;
PutError('致命的エラー発生');
end;

finally
SL.Free;
end;