I’ve subclassed SSLSocket, and I’m using AddHandler to add an error handler. Under API 1.0 my delegate method had the one parameter, the subclass. That has worked fine so far.
Under API 2.0, the error handler is defined as having a RuntimeException as a parameter, but I don’t seem to be able to declare that without the compiler complaining. A declaration like this, for instance:
Sub errorEvent (s as MySSLClass, e as RuntimeException)
used with AddHandler thus:
Addhandler me.Error, WeakAddressOf errorEvent
and the compiler complains that “this method requires more parameters than were passed” and about a delegate mismatch. I suppose my syntax is wrong somehow - can anyone advise?
Also: if I have an error handler handling errors, albeit passed as an exception, do I still need try/catch round socket actions?