>>> I'm trying to handle exceptions of all httpcli into a single procedure.
>>> I've have used HttpCli.CtrlSocket.onBgException, but this not fired at
>>> all.
>>> When I click twice on Button1, I get an error 'HttpCli is busy'.
>>> This is normal, but I wan't to intercept this.
>>>
>>> How ?

>> Use try/except:
>>
>> procedure TForm13.Button1Click(Sender: TObject);
>> begin
>>  HttpCli1.URL:= 'http://www.google.com/';
>>  HttpCli1.RcvdStream:= TMemoryStream.create;
>>  try
>>    HttpCli1.GetASync;
>>  except
>>    // Blablabla...
>>  end;
>> end;

> but a central place would be much nicer, especially if you have a lot of
> clients together (50 +) ..

Then derive your own THttpCli from ICS's one and override GetAsync with 
version having try/except block and generating a new event of trigering an 
existing. Half an hour to do that.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


-- 
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