title: Java Exception handling within "events"
body: <p>I would like to get a second opinion on how to handle Exceptions within "events" (key input, screen update etc).  In this case I have control over the event-sender.</p>
  
  <p>So a module is set to handle an event (it implements a listener interface, and is registered against an event sender):</p>
  
  <pre><code>public void DefaultSet ( CardData oldDefault, CardData newDefault )
  {
  }
  </code></pre>
  
  <p>The event sender is simply:</p>
  
  <pre><code>        for ( Enumeration e = listeners.elements(); e.hasMoreElements(); )
          {
              RetrieverListener thisListener = (RetrieverListener) e.nextElement();
              thisListener.DefaultSet( oldDefault, newDefault );
          }
  </code></pre>
  
  <p>So if/when something goes wrong in the receiver:</p>
  
  <ul>
  <li><p>Should I try to cope with the exception there, and never throw anything back to the sender?  Sometimes the listeners don't have the "context" to handle an error correctly, is that right?</p></li>
  <li><p>Is it frowned on to throw an exception back to an event-sending module, to be handled in a documented way? e.g. "Throwing an IOException will result in a reset..  ".  This seems non-standard from the javadocs I have read.</p></li>
  <li><p>Should I just log and ignore the exception when something goes wrong &amp; nothing can be done about it?</p></li>
  </ul>