[squeak-dev] Re: Webclient debug error

Andreas Raab andreas.raab at gmx.de
Fri Aug 6 16:49:35 UTC 2010


On 8/6/2010 6:06 AM, Lawson English wrote:
> http://homepage.mac.com/svc/Reddit.st/
>
> suggests using
>
> (WebClient httpGet: self url) isSuccess
>
> to test for a valid URL.

Looks like this needs to be wrapped into an error handler, e.g.,

	[(WebClient httpGet: self url) isSuccess]
		on: Error do:[:ex| ex return false].

Cheers,
   - Andreas

> however if it is not valid or is poorly formed you get an debugger error
> message. e.g. :
>
>
>
> (WebClient httpGet: 'http://www.google.com') isSuccess. => true
>
> (WebClient httpGet: 'http://www.google.c') isSuccess ===> retry/giveup
> (giveup) ==> primSocket:connectTo:port: failed
> (WebClient httpGet: 'http://gjfdgi436.com') isSuccess ===> retry/giveup
> (giveup) ==> primSocket:connectTo:port: failed
>
> using Seaside 3.0 on squeak 4.1. and using pristine Squeak 4.1 image.
>
>
> So, I'm guessing that is a bug. Also, is there another way to test for
> vaid URLs using squeak/seaside?
>
>
> Lawson
>
>
>
>
>
>
>
>
>
>
>




More information about the Squeak-dev mailing list