Re: [twsocket] More friendly winsock exceptions

2016-10-24 Thread François Piette
> We also have a long term problem with the OnError event. It skips raising
an exception and 
> simply calls the event without the actual error information being
available, and in a few 
> places continues program flow, not sure how useful this is, it probably
confuses users.

The OnError event can stay just like it is now and a new event OnException
can be created with the instance of the TWSocketException so that every
information is available.


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


Re: [twsocket] More friendly winsock exceptions

2016-10-24 Thread Angus Robertson - Magenta Systems Ltd
> IMO the correct way to handle this enhancement is to extend 
> ESocketException to add more fields with more details about the
> exception, without changing the current error message.

In principle I agree, although I'd add an option for the friendly error
message to be the default instead of the standard error number version,
to avoid massive application changes as well.  

However the implementation will not be easy, since there are multiple
levels of handler the information passes through, RaiseException and
SocketError, which all need changing.

We also have a long term problem with the OnError event. It skips
raising an exception and simply calls the event without the actual
error information being available, and in a few places continues
program flow, not sure how useful this is, it probably confuses users.


Angus
 


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