Arno Garrels wrote:
> colin masters wrote:
>> I am creating the component at runtime, which seems to work well,
>> however is there a way to surpress the connection timeout message if
>> I can not connect to a web site as I do not wish to see it.
> 
> What message do you mean? Do you call synchronous methods and do not
> want to show component's own timeout exceptions?:
> 
> try
>  HttpCli1.Get; // synchronous method
> except
>  if (HttpCli1.StatusCode = 404) and
>     (Pos('aborted on timeout', HttpCli1.ReasonPhrase) > 0) then
>    Exit; // ignore
>  Display(..);
> end;

Well, when I look at procedure THttpCli.DoRequestSync(Rq : THttpRequest);
I think there is a bug because FRequestDoneError should be passed as the
ErrCode to EHttpException.Create() rather than the StatusCode if 
FRequestDoneError <> 0, that way one would be able to inspect EHttpException's
ErrorCode property and act accordingly. The StatusCode is a public property
of THttpCli anyway.

What do you/all think?

-- 
Arno Garrels  
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to