001    /*
002     * Created on Jul 20, 2008
003     * 
004     * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
005     * in compliance with the License. You may obtain a copy of the License at
006     * 
007     * http://www.apache.org/licenses/LICENSE-2.0
008     * 
009     * Unless required by applicable law or agreed to in writing, software distributed under the License
010     * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
011     * or implied. See the License for the specific language governing permissions and limitations under
012     * the License.
013     * 
014     * Copyright @2008-2010 the original author or authors.
015     */
016    package org.fest.swing.core;
017    
018    /**
019     * Understands an exception handler for AWT event thread, to make sure we can get a back-trace dump when running 
020     * FEST-Swing are terminated by a <code>{@link EmergencyAbortListener}</code>.
021     * <p>
022     * This exception handler is passed to the JVM using the system property "sun.awt.exception.handler" to override the
023     * default exception handling behavior of the event dispatch thread.
024     * </p>
025     * <p>
026     * This is a Sun-specific feature (or "bug".) See <a
027     * href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4714232" target="_blank">bug 4714232</a>.
028     * </p>
029     * 
030     * @author <a href="mailto:simeon.fitch@mseedsoft.com">Simeon H.K. Fitch</a>
031     */
032    public class SimpleFallbackExceptionHandler {
033    
034      /**
035       * Prints the stack trace of the given exception to the standard error stream.
036       * @param t the given exception.
037       */
038      public void handle(Throwable t) {
039        t.printStackTrace();
040      }
041    }