public void uncaughtException(Thread thread, final Throwable throwable) {
System.out.println("A uncaught exception was thrown -> Thread: " + thread + " Throwable: " + throwable);
if (throwable instanceof AssertionFailedError) {
AssertionFailedError ae = (AssertionFailedError) throwable;
ae.printStackTrace();
// fail(ae.getMessage()); //doesent work here because its in the animation thread rather than in the junit main thread
// fail();
errors.add(ae);
// app.exit();
// }else if (throwable instanceof NullPointerException){