Examples of ExceptionContainer


Examples of org.uispec4j.utils.ExceptionContainer

  private void runBareInSwingThread() throws Throwable {
    if (SwingUtilities.isEventDispatchThread()) {
      super.runBare();
      return;
    }
    final ExceptionContainer container = new ExceptionContainer();
    try {
      SwingUtilities.invokeAndWait(new Runnable() {
        public void run() {
          try {
            FreeplaneTestCase.super.runBare();
          }
          catch (Throwable e) {
            container.set(e);
          }
        }
      });
    }
    catch (InterruptedException e) {
      throw new RuntimeException(e.getCause());
    }
    catch (InvocationTargetException e) {
      throw new RuntimeException(e.getCause());
    }
    container.rethrowIfNeeded();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.