Theo69
(Theo)
July 21, 2022, 10:59am
1
My last project doesn’t compile anymore after I made a bulk of changes in it.
I retried building it after I installed the last Water and Elements from the firehose.
The error:
Project to reproduce:
removed
How to reproduce: extract the zip, load it in Water and rebuild.
mh
(marc hoffman)
July 21, 2022, 11:16am
2
Did it break after you made changes (ie the bug probably always was there) or after updating to the latest (ie it’s probably a regression)?
mh
(marc hoffman)
July 21, 2022, 11:20am
4
it’s something related to this code, if that helps you work around:
tryStatement: TryStatement = {try
scope begin
begin
myReq := (HttpWebRequest.Create(System.String.Format('https://api.abuseipdb.com/api/v2/check?ipAddress={0}', Ip)) as HttpWebRequest);
myReq.set_Method('GET');
myReq.get_Headers().Add('Key', self._API_Key);
myReq.set_Accept('text/plain');
myResp := myReq.GetResponse();
myReader := new System.IO.StreamReader(myResp.GetResponseStream);
ReturnValue := myReader.ReadToEnd();
Score := Split(ReturnValue, '"abuseConfidenceScore":', -1, 0)[1];
Score := Split(Score, ',', -1, 0)[0];
begin
:= (Val(Score) < 100);
goto [LABEL edae5c47-0a65-4bc6-be22-b1b625e6c383]
end
end end
end}
mh
(marc hoffman)
July 21, 2022, 11:22am
5
Looks like it doesn’t like Try
/End Trywithout a
Finallyor a
Catch. TBH I didn't know this was valid. what does this do, imply a
catch all`?
Theo69
(Theo)
July 21, 2022, 11:28am
6
The previo
It broke after the changes, tried the newest version to see if it was already solved.
Theo69
(Theo)
July 21, 2022, 11:33am
7
You are right
That is the bug.
So the problem is that the compiler does not detect this code error and crashes instead.
mh
(marc hoffman)
July 21, 2022, 12:00pm
8
So I take it this should not be supported, and emit a (clean, ofc) error just like it does in Oxygene?
1 Like
Theo69
(Theo)
July 21, 2022, 12:00pm
9
Yes, a catch and/or finally is mandatory.
1 Like
bugs://E26022 was closed as fixed.