mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 11:48:34 +02:00
+ Patch to return nil if there is no exception object (as in Delphi)
This commit is contained in:
parent
fd8927391f
commit
71f56b3d61
@ -57,7 +57,7 @@ end;
|
||||
function AcquireExceptionObject: Pointer;
|
||||
begin
|
||||
If ExceptObjectStack=nil then begin
|
||||
runerror(231); // which error?
|
||||
AcquireExceptionObject := nil
|
||||
end else begin
|
||||
Inc(ExceptObjectStack^.refcount);
|
||||
AcquireExceptionObject := ExceptObjectStack^.FObject;
|
||||
@ -66,15 +66,12 @@ end;
|
||||
|
||||
procedure ReleaseExceptionObject;
|
||||
begin
|
||||
If ExceptObjectStack=nil then begin
|
||||
runerror(231); // which error?
|
||||
end else begin
|
||||
if ExceptObjectStack^.refcount = 0 then begin
|
||||
runerror(231); // which error?
|
||||
end;
|
||||
If ExceptObjectStack <> nil then begin
|
||||
if ExceptObjectStack^.refcount > 0 then begin
|
||||
Dec(ExceptObjectStack^.refcount);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifndef HAS_ADDR_STACK_ON_STACK}
|
||||
Function fpc_PushExceptAddr (Ft: Longint): PJmp_buf ;
|
||||
@ -349,7 +346,10 @@ begin
|
||||
end;
|
||||
{
|
||||
$Log$
|
||||
Revision 1.20 2005-04-03 11:32:05 florian
|
||||
Revision 1.21 2005-05-08 21:20:26 michael
|
||||
+ Patch to return nil if there is no exception object (as in Delphi)
|
||||
|
||||
Revision 1.20 2005/04/03 11:32:05 florian
|
||||
* ref. counting for popping second exceptiono object fixed
|
||||
|
||||
Revision 1.19 2005/02/14 17:13:22 peter
|
||||
|
Loading…
Reference in New Issue
Block a user