ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/udr/source/FBUDRController.pas
(Generate patch)

Comparing ibx/branches/udr/udr/source/FBUDRController.pas (file contents):
Revision 385 by tony, Mon Jan 17 15:56:35 2022 UTC vs.
Revision 386 by tony, Tue Jan 18 12:05:35 2022 UTC

# Line 874 | Line 874 | var aProcMetadata: IFBUDRProcMetadata;
874   begin
875    InputParams := nil;
876    InputParamsSQLDA := nil;
877 +  Result := nil;
878    try
879      if loLogProcedures in FBUDRControllerOptions.LogOptions then
880        FController.WriteToLog(SOpenExecuteProc + FName);
# Line 932 | Line 933 | begin
933      end;
934      except on E: Exception do
935        begin
936 <        Result.dispose;
936 >        if Result <> nil then
937 >          Result.dispose;
938          Result := nil;
939          FController.FBSetStatusFromException(E,status);
940        end;
# Line 960 | Line 962 | var aProcMetadata: IFBUDRProcMetadata;
962      metadata: Firebird.IMessageMetadata;
963      FBContext: IFBUDRExternalContext;
964   begin
965 +  Result := nil;
966    try
967      if loLogProcedures in FBUDRControllerOptions.LogOptions then
968        FController.WriteToLog(SOpenSelectProc + FName);
# Line 1017 | Line 1020 | begin
1020      end;
1021      except on E: Exception do
1022        begin
1023 <        Result.dispose;
1023 >        if Result <> nil then
1024 >          Result.dispose;
1025          Result := nil;
1026          FController.FBSetStatusFromException(E,status);
1027        end;
# Line 2203 | Line 2207 | end;
2207  
2208   procedure TFBUDRController.FBSetStatusFromException(E: Exception; aStatus: Firebird.IStatus);
2209   var StatusVector: TStatusVector;
2210 +    ErrorVector: NativeIntPtr;
2211   begin
2212    if E is EFBUDRException then
2213      aStatus.setErrors((E as EFBUDRException).Status.getErrors())
2214    else
2215    if E is EIBInterBaseError then
2216 <    aStatus.setErrors(NativeIntPtr(((E as EIBInterBaseError).Status as TFB30Status).GetStatus.getErrors))
2216 >  begin
2217 >    ErrorVector := ((E as EIBInterBaseError).Status as TFB30Status).GetStatus.getErrors();
2218 >    astatus.setErrors(ErrorVector);
2219 >  end
2220    else
2221    begin
2222      FMessageBuffer := E.Message;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines