mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 01:49:09 +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;
|
ExceptAddrStack : PExceptAddr;
|
||||||
ExceptObjectStack : PExceptObject;
|
ExceptObjectStack : PExceptObject;
|
||||||
|
|
||||||
{$IFNDEF VIRTUALPASCAL}
|
|
||||||
Function RaiseList : PExceptObject;
|
Function RaiseList : PExceptObject;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
RaiseList:=ExceptObjectStack;
|
RaiseList:=ExceptObjectStack;
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
function AcquireExceptionObject: Pointer;
|
function AcquireExceptionObject: Pointer;
|
||||||
begin
|
begin
|
||||||
If ExceptObjectStack=nil then begin
|
If ExceptObjectStack<>nil then
|
||||||
AcquireExceptionObject := nil
|
begin
|
||||||
end else begin
|
Inc(ExceptObjectStack^.refcount);
|
||||||
Inc(ExceptObjectStack^.refcount);
|
AcquireExceptionObject := ExceptObjectStack^.FObject;
|
||||||
AcquireExceptionObject := ExceptObjectStack^.FObject;
|
end
|
||||||
end;
|
else
|
||||||
|
RunError(231);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure ReleaseExceptionObject;
|
procedure ReleaseExceptionObject;
|
||||||
begin
|
begin
|
||||||
If ExceptObjectStack <> nil then begin
|
If ExceptObjectStack <> nil then
|
||||||
if ExceptObjectStack^.refcount > 0 then begin
|
begin
|
||||||
Dec(ExceptObjectStack^.refcount);
|
if ExceptObjectStack^.refcount > 0 then
|
||||||
end;
|
Dec(ExceptObjectStack^.refcount);
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
RunError(231);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ;
|
Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ;
|
||||||
[Public, Alias : 'FPC_PUSHEXCEPTADDR'];compilerproc;
|
[Public, Alias : 'FPC_PUSHEXCEPTADDR'];compilerproc;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user