Menu

#319 gexperts delphi6 1-3-22 exception

Closed
closed-fixed
None
5
2023-05-18
2023-05-09
carrchri
No

Hello,
I see in last version released 1-3-22 (r4013) there is again the string write error and notice that the modification I did in #285 was lost ?

It is in u_dzClassUtils, Can you take again this modification?

function TStream_WriteString(_Stream: TStream; const _s: RawByteString): Integer;
var
  Len: Integer;
  ErrCode: DWORD;
begin
  Result := 0;
  Len := Length(_s);
  if Len > 0 then begin
    Result := _Stream.Write(_s[1], Len);
    if Result <> Len then begin
      ErrCode := GetLastError;
      RaiseLastOSErrorEx(ErrCode,
        Format(_('Error writing string of length %d to stream, wrote only %d bytes: %%1:s (%%0:d)'),
        [Len, Result]));
    end;
  end;
end;

Discussion

  • Thomas Mueller

    Thomas Mueller - 2023-05-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,7 +2,7 @@
     I see in last version released 1-3-22 (r4013) there is again the string write error and notice that the modification I did in #285 was lost ?
    
     It is in u_dzClassUtils, Can you take again this modification?
    -
    +~~~
     function TStream_WriteString(_Stream: TStream; const _s: RawByteString): Integer;
     var
       Len: Integer;
    @@ -20,3 +20,4 @@
         end;
       end;
     end;
    +~~~
    
    • status: open --> closed-fixed
    • Group: New --> Closed
     
  • Thomas Mueller

    Thomas Mueller - 2023-05-18

    Fixed in revision #4031

     

Log in to post a comment.

MongoDB Logo MongoDB