List of usage examples for java.lang ThreadDeath printStackTrace
public void printStackTrace()
From source file:EventDispatcher.java
protected static void dispatchEvent(final Dispatcher dispatcher, final Object[] ll, final Object evt) { ThreadDeath td = null;//www .ja v a 2 s .c o m try { for (int i = 0; i < ll.length; i++) { try { Object l; synchronized (ll) { l = ll[i]; if (l == null) continue; ll[i] = null; } dispatcher.dispatch(l, evt); } catch (ThreadDeath t) { // Keep delivering messages but remember to throw later. td = t; } catch (Throwable t) { t.printStackTrace(); } } } catch (ThreadDeath t) { // Remember to throw later. td = t; } catch (Throwable t) { if (ll[ll.length - 1] != null) dispatchEvent(dispatcher, ll, evt); t.printStackTrace(); } if (td != null) throw td; }