* give runerror 231 if exceptobjectstack=nil

git-svn-id: trunk@401 -
This commit is contained in:
peter 2005-06-14 05:22:18 +00:00
parent 26646298a4
commit 58cdeb8184

View File

@ -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;