8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00

Restore local variable usage.

This commit is contained in:
Vlad Khorsun 2023-04-10 14:23:36 +03:00
parent 308579c2f7
commit f4361bb670

View File

@ -24,6 +24,7 @@ end;
class procedure FbException.catchException(status: IStatus; e: Exception); class procedure FbException.catchException(status: IStatus; e: Exception);
var var
statusVector: array[0..4] of NativeIntPtr; statusVector: array[0..4] of NativeIntPtr;
msg: AnsiString;
begin begin
if (not Assigned(status)) then if (not Assigned(status)) then
Exit; Exit;
@ -32,10 +33,12 @@ begin
status.setErrors(FbException(e).getStatus.getErrors) status.setErrors(FbException(e).getStatus.getErrors)
else else
begin begin
msg := AnsiString(e.message);
statusVector[0] := NativeIntPtr(isc_arg_gds); statusVector[0] := NativeIntPtr(isc_arg_gds);
statusVector[1] := NativeIntPtr(isc_random); statusVector[1] := NativeIntPtr(isc_random);
statusVector[2] := NativeIntPtr(isc_arg_string); statusVector[2] := NativeIntPtr(isc_arg_string);
statusVector[3] := NativeIntPtr(PAnsiChar(AnsiString(e.message))); statusVector[3] := NativeIntPtr(PAnsiChar(msg));
statusVector[4] := NativeIntPtr(isc_arg_end); statusVector[4] := NativeIntPtr(isc_arg_end);
status.setErrors(@statusVector); status.setErrors(@statusVector);