logging and unit test updates
[debian/openrocket] / src / net / sf / openrocket / gui / main / ExceptionHandler.java
index 702c3025cf5d866644f5a85dbf93d9e395f57bff..4099f019120d4c4942c5db5c1b795854ea96d29d 100644 (file)
@@ -103,14 +103,14 @@ public class ExceptionHandler implements Thread.UncaughtExceptionHandler {
         * @param exception             the exception that occurred.
         */
        public static void handleErrorCondition(final Exception exception) {
-               final ExceptionHandler handler;
+               final ExceptionHandler handler = instance;
 
                try {
 
-                       if (instance == null) {
-                               handler = new ExceptionHandler();
-                       } else {
-                               handler = instance;
+                       if (handler == null) {
+                               // Not initialized, simply print the exception
+                               exception.printStackTrace();
+                               return;
                        }
 
                        final Thread thread = Thread.currentThread();