From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx20.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:36.0) Gecko/20100101 Thunderbird/36.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Interesting AWS error. Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Wed, 10 Dec 2014 05:15:18 UTC Organization: TeraNews.com Date: Tue, 09 Dec 2014 22:15:16 -0700 X-Received-Bytes: 3905 X-Received-Body-CRC: 755372400 Xref: news.eternal-september.org comp.lang.ada:23925 Date: 2014-12-09T22:15:16-07:00 List-Id: I'm running AWS on windows, built with Pascal's now-disappeared* .bat file and [IIRC] with SSL support. I'm getting the following when I try feeding an https protocol URL to the AWS.Client.Get subprogram: raised PROGRAM_ERROR : aws-client.adb:317 finalize/adjust raised exception The indicated line seems to be a declare-block, literally the word 'declare'... which makes the PROGRAM_ERROR itself puzzling to me. I didn't think that the declare itself could raise PROGRAM_ERROR... or that it would be flagged as the trouble-spot. ------------- * It used to be in the git repo, but I foolishly updated and it was deleted. :( -- If anyone has a copy it would be most appreciated. ------------- 299 function Get 300 (URL : String; 301 User : String := No_Data; 302 Pwd : String := No_Data; 303 Proxy : String := No_Data; 304 Proxy_User : String := No_Data; 305 Proxy_Pwd : String := No_Data; 306 Timeouts : Timeouts_Values := No_Timeout; 307 Data_Range : Content_Range := No_Range; 308 Follow_Redirection : Boolean := False; 309 Certificate : String := Default.Client_Certificate; 310 Headers : Header_List := Empty_Header_List) 311 return Response.Data 312 is 313 use type Messages.Status_Code; 314 315 Result : Response.Data; 316 begin 317 declare 318 Connection : HTTP_Connection; 319 begin 320 Create (Connection, 321 URL, User, Pwd, Proxy, Proxy_User, Proxy_Pwd, 322 Persistent => False, 323 Certificate => Certificate, 324 Timeouts => Timeouts); 325 326 Get (Connection, Result, 327 Data_Range => Data_Range, Headers => Headers); 328 329 Close (Connection); 330 exception 331 when others => 332 Close (Connection); 333 raise; 334 end; 335 336 declare 337 SC : constant Messages.Status_Code := Response.Status_Code (Result); 338 begin 339 if Follow_Redirection and then SC = Messages.S305 then 340 -- This is "Use Proxy" message, Location point to the proxy to 341 -- use. We do not have the login/password for the proxy. 342 return Get 343 (URL, User, Pwd, Response.Location (Result), 344 Timeouts => Timeouts, 345 Follow_Redirection => Follow_Redirection, 346 Certificate => Certificate); 347 348 elsif Follow_Redirection 349 and then SC in Messages.Redirection 350 and then SC /= Messages.S300 -- multiple choices 351 and then SC /= Messages.S304 -- not modified, no redirection 352 then 353 return Get 354 (Response.Location (Result), User, Pwd, 355 Proxy, Proxy_User, Proxy_Pwd, Timeouts, 356 Data_Range, Follow_Redirection, Certificate => Certificate); 357 else 358 return Result; 359 end if; 360 end; 361 end Get;