On Jul 11, 2011, at 12:04 PM, Niklas Gustavsson wrote: > On Mon, Jul 11, 2011 at 7:43 PM, Alan D. Cabrera <[email protected]> wrote: >> Is there a concrete use case where this is necessary? If a filter barfs in >> such a way that it leaks an exception should not this always be treated as a >> critical error? > > You might at least allow the implementation to handle the error before > closing the session. In the case of XMPP, we might want to send an > error stanza and a closing stream stanza before the session is closed.
That makes sense but wouldn't the implementation of IoFilter catch the exception and do the required task within the context of the error? Why let the exception fly out and be caught by the external framework only to be sent in via an event handler with no relevant context? Regards, Alan
