comp.lang.ada
 help / color / mirror / Atom feed
* using a Get in AWS
@ 2014-09-27 21:11 tonyg
  2014-09-28  9:33 ` Simon Wright
  0 siblings, 1 reply; 5+ messages in thread
From: tonyg @ 2014-09-27 21:11 UTC (permalink / raw)




I get an error (according to the stack trace) at the begin statement, I cannot see why this should happen!
I've listed the error then the code used to try it

Execution terminated by unhandled exception
Exception name: CONSTRAINT_ERROR
Message: aws-url.adb:339 range check failed


with AWS.Client; use AWS.Client;
with AWS.Response;
with Ada.Text_IO;
procedure Main_Aws_Test is


  
   Test_Data : AWS.Response.Data := 
     AWS.Client.Get (URL  => "www.yahoo.com"  );
   
   Test_String : constant String := AWS.Response.Message_Body(Test_Data);

begin

Ada.Text_IO.Put_Line (Test_String);



end Main_Aws_Test;


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a Get in AWS
  2014-09-27 21:11 using a Get in AWS tonyg
@ 2014-09-28  9:33 ` Simon Wright
  2014-09-28 11:08   ` tonyg
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2014-09-28  9:33 UTC (permalink / raw)


tonyg <tonythegair@gmail.com> writes:

> Execution terminated by unhandled exception
> Exception name: CONSTRAINT_ERROR
> Message: aws-url.adb:339 range check failed
>
>
> with AWS.Client; use AWS.Client;
> with AWS.Response;
> with Ada.Text_IO;
> procedure Main_Aws_Test is
>
>
>   
>    Test_Data : AWS.Response.Data := 
>      AWS.Client.Get (URL  => "www.yahoo.com"  );

If this happened to me I'd start by seeing what happens at
aws-url.adb:339 and (then) try the full URL "http://www.yahoo.com".


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a Get in AWS
  2014-09-28  9:33 ` Simon Wright
@ 2014-09-28 11:08   ` tonyg
  2014-09-28 16:49     ` Jeffrey Carter
  2014-09-28 19:11     ` Pascal Obry
  0 siblings, 2 replies; 5+ messages in thread
From: tonyg @ 2014-09-28 11:08 UTC (permalink / raw)


On Sunday, 28 September 2014 10:33:29 UTC+1, Simon Wright  wrote:
> tonyg writes:
> 
> 
> 
> > Execution terminated by unhandled exception
> 
> > Exception name: CONSTRAINT_ERROR
> 
> > Message: aws-url.adb:339 range check failed
> 
> >
> 
> >
> 
> > with AWS.Client; use AWS.Client;
> 
> > with AWS.Response;
> 
> > with Ada.Text_IO;
> 
> > procedure Main_Aws_Test is
> 
> >
> 
> >
> 
> >   
> 
> >    Test_Data : AWS.Response.Data := 
> 
> >      AWS.Client.Get (URL  => "www.yahoo.com"  );
> 
> 
> 
> If this happened to me I'd start by seeing what happens at
> 
> aws-url.adb:339 and (then) try the full URL "http://www.yahoo.com".

Thanks Simon. The lack of the http:// was the problem. I have accordingly slapped myself in the face with a sizable haddock several times 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a Get in AWS
  2014-09-28 11:08   ` tonyg
@ 2014-09-28 16:49     ` Jeffrey Carter
  2014-09-28 19:11     ` Pascal Obry
  1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey Carter @ 2014-09-28 16:49 UTC (permalink / raw)


On 09/28/2014 04:08 AM, tonyg wrote:
> 
> I have accordingly slapped myself in the face with a sizable haddock several times 

The rare, one-man fish-slapping dance!

-- 
Jeff Carter
"I wave my private parts at your aunties."
Monty Python & the Holy Grail
13


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using a Get in AWS
  2014-09-28 11:08   ` tonyg
  2014-09-28 16:49     ` Jeffrey Carter
@ 2014-09-28 19:11     ` Pascal Obry
  1 sibling, 0 replies; 5+ messages in thread
From: Pascal Obry @ 2014-09-28 19:11 UTC (permalink / raw)


Le dimanche 28 septembre 2014 à 04:08 -0700, tonyg a écrit :
> Thanks Simon. The lack of the http:// was the problem. I have
> accordingly slapped myself in the face with a sizable haddock several
> times 

Yet the error message is not really helpful, I'll try to fix that at
some point.

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://v2p.fr.eu.org
  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-28 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-27 21:11 using a Get in AWS tonyg
2014-09-28  9:33 ` Simon Wright
2014-09-28 11:08   ` tonyg
2014-09-28 16:49     ` Jeffrey Carter
2014-09-28 19:11     ` Pascal Obry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox