Jon Robertson wrote:
FWIW, I've patched the exception handler in ASyncReceive as below. If there
are objections, please explain them so I can determine another solution.
except
on E:Exception do begin
bMore := FALSE;
HandleBackGroundException(E);
end;
end;
Seems fine. That's probably what I was going to do.
One thing to note is that applications that currently depend on Abort not
being called here will need to implement OnBgException and set CanAbort to
False.
That is true. And I just noticed one more thing: If OnBgException is
not assigned (or if the handler generates an exception), the exception
will propagate all the way to TCustomWSocket.WndProc(), which will
call.............. HandleBackGroundException(E) again!
Since what we want is to give the application a chance to handle the
error whenever the TriggerOnDataAvailable call raises an exception, it
may be better to catch that particular event and treat it specially.
I'll have to think about this one to come up with a better solution.
dZ.
--
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