mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 14:49:11 +02:00
* Fix issue #39342, after exception in doapplyupdates, res is not valid
This commit is contained in:
parent
239557237f
commit
06b659f787
@ -2940,12 +2940,12 @@ begin
|
|||||||
on E: EDatabaseError do
|
on E: EDatabaseError do
|
||||||
begin
|
begin
|
||||||
Result.Response:=ErrorResponse[AbortOnError];
|
Result.Response:=ErrorResponse[AbortOnError];
|
||||||
if HandleUpdateError(aUpdate,Result,E) then
|
|
||||||
DoApplyUpdate(aUpdate,AbortOnError);
|
|
||||||
Result.HadError:=True;
|
Result.HadError:=True;
|
||||||
end
|
if HandleUpdateError(aUpdate,Result,E) then
|
||||||
else
|
DoApplyUpdate(aUpdate,AbortOnError)
|
||||||
raise;
|
else
|
||||||
|
raise;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2995,8 +2995,11 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
FUpdateBuffer[r].Processing:=False;
|
FUpdateBuffer[r].Processing:=False;
|
||||||
if not UpdOK then // We have an exception, force HadError
|
if not UpdOK then // We have an exception, res is not valid in this case. So force HadError
|
||||||
|
begin
|
||||||
Res.HadError:=True;
|
Res.HadError:=True;
|
||||||
|
Res.Response:=rrAbort;
|
||||||
|
end;
|
||||||
if Res.HadError then
|
if Res.HadError then
|
||||||
Inc(FailedCount);
|
Inc(FailedCount);
|
||||||
if Res.Response in [rrApply, rrIgnore] then
|
if Res.Response in [rrApply, rrIgnore] then
|
||||||
|
Loading…
Reference in New Issue
Block a user