* Add RangeIndexError (delphi compatible)

This commit is contained in:
Michaël Van Canneyt 2024-08-14 15:14:11 +02:00
parent 081af9a892
commit 0533acdc27
2 changed files with 7 additions and 0 deletions

View File

@ -264,6 +264,7 @@ type
procedure ListIndexError(aIndex,aMax: Integer; aObj: TObject);
function ListIndexErrorMsg(aIndex, aMaxIndex: SizeInt; const aListObjName: string): string; overload;
function ListIndexErrorMsg(aIndex, aMaxIndex: SizeInt; aListObj: TObject): string; overload;
procedure RangeIndexError(aIndex, aMaxIndex: SizeInt; aListObj: TObject);
Type
TBeepHandler = Procedure;

View File

@ -531,6 +531,12 @@ end;
{$pop} //{$S-} for Error handling functions
procedure RangeIndexError(aIndex, aMaxIndex: SizeInt; aListObj: TObject);
begin
raise ERangeError.Create(ListIndexErrorMsg(aIndex,aMaxIndex,aListObj));
end;
Procedure InitExceptions;
{
Must install uncaught exception handler (ExceptProc)