Changeset 137 for trunk/UTarget.pas
- Timestamp:
- Mar 5, 2022, 4:38:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTarget.pas
r136 r137 167 167 SNone = 'None'; 168 168 SNormal = 'Normal'; 169 SProgramIndexError = 'Old program index higher than new (old: %d, new: %d)'; 170 SFirstIndexHigherThanLastIndex = 'First index higher than last index'; 171 SFirstIndexOutOfRange = 'First index out of range'; 172 SLastIndexOutOfRange = 'Last index out of range'; 169 173 170 174 const … … 319 323 320 324 procedure TDebugSteps.UpdateTargetPos(OldProgramFrom, OldProgramTo, NewProgramFrom, 321 325 NewProgramTo: Integer; NewTarget: Integer = 0); 322 326 var 323 327 I: Integer; … … 329 333 if (First <> -1) and (Last <> -1) then begin 330 334 if First > Last then 331 raise Exception.Create( 'First index higher than last index');335 raise Exception.Create(SFirstIndexHigherThanLastIndex); 332 336 if (First < 0) or (First >= Count) then 333 raise Exception.Create( 'First index out of range');337 raise Exception.Create(SFirstIndexOutOfRange); 334 338 if (Last < 0) or (Last >= Count) then 335 raise Exception.Create( 'Last index out of range');339 raise Exception.Create(SLastIndexOutOfRange); 336 340 for I := Last downto First + 1 do Delete(I); 337 341 … … 343 347 Items[First].TargetPosition := NewTarget; 344 348 end else 345 raise Exception.Create( 'Old program index higher than new');349 raise Exception.Create(Format(SProgramIndexError, [SProgramIndexError, NewProgramTo])); 346 350 end; 347 351 end;
Note:
See TracChangeset
for help on using the changeset viewer.