mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:00:07 +02:00
* give runerror 231 if exceptobjectstack=nil
git-svn-id: trunk@401 -
This commit is contained in:
parent
26646298a4
commit
58cdeb8184
@ -42,33 +42,36 @@ ThreadVar
|
||||
ExceptAddrStack : PExceptAddr;
|
||||
ExceptObjectStack : PExceptObject;
|
||||
|
||||
{$IFNDEF VIRTUALPASCAL}
|
||||
Function RaiseList : PExceptObject;
|
||||
|
||||
begin
|
||||
RaiseList:=ExceptObjectStack;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
function AcquireExceptionObject: Pointer;
|
||||
begin
|
||||
If ExceptObjectStack=nil then begin
|
||||
AcquireExceptionObject := nil
|
||||
end else begin
|
||||
Inc(ExceptObjectStack^.refcount);
|
||||
AcquireExceptionObject := ExceptObjectStack^.FObject;
|
||||
end;
|
||||
If ExceptObjectStack<>nil then
|
||||
begin
|
||||
Inc(ExceptObjectStack^.refcount);
|
||||
AcquireExceptionObject := ExceptObjectStack^.FObject;
|
||||
end
|
||||
else
|
||||
RunError(231);
|
||||
end;
|
||||
|
||||
|
||||
procedure ReleaseExceptionObject;
|
||||
begin
|
||||
If ExceptObjectStack <> nil then begin
|
||||
if ExceptObjectStack^.refcount > 0 then begin
|
||||
Dec(ExceptObjectStack^.refcount);
|
||||
end;
|
||||
end;
|
||||
If ExceptObjectStack <> nil then
|
||||
begin
|
||||
if ExceptObjectStack^.refcount > 0 then
|
||||
Dec(ExceptObjectStack^.refcount);
|
||||
end
|
||||
else
|
||||
RunError(231);
|
||||
end;
|
||||
|
||||
|
||||
Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ;
|
||||
[Public, Alias : 'FPC_PUSHEXCEPTADDR'];compilerproc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user