I would like to get a second opinion on how to handle exceptions in "events" (key input, screen refresh, etc.). In this case, I have control over the event sender.
Thus, the module is configured to handle the event (it implements the listener interface and registers with the event sender):
public void DefaultSet ( CardData oldDefault, CardData newDefault )
{
}
the event sender is simply:
for ( Enumeration e = listeners.elements(); e.hasMoreElements(); )
{
RetrieverListener thisListener = (RetrieverListener) e.nextElement();
thisListener.DefaultSet( oldDefault, newDefault );
}
So, if / when something goes wrong in the receiver:
Should I try to deal with this exception and never send anything to the sender? Sometimes listeners do not have a “context” for correctly handling the error, is this true?
, , ? " IO reset..". javadocs, .
, - , ?
James Norris