예제 #1
0
 /** Implementation IExceptionReporter * */
 public void reportException(Throwable e) {
   if (e instanceof ApplicationLaunchException) destroyRuntime();
   displayView.setError(
       e,
       e.getClass().getName().substring(e.getClass().getName().lastIndexOf('.') + 1)
           + " : "
           + e.getMessage());
 }
예제 #2
0
 public void closeApplication(boolean closeApplicationNeeded) throws RuntimeException {
   /*
    * We need to actually call the stopApplication that calls the teardown
    * on the fixture. However, the fixture that created the application (by
    * using setup) is already lost and we can't communicate with the app
    * using fixture when manually starting the application. For making this
    * work, we need changes in the semantics of the Script and Runtime
    */
   try {
     if (closeApplicationNeeded && runtime != null && !autShutdown) runtime.stopApplication();
   } catch (Exception e) {
     displayView.setError(e, "Application Under Test Aborted");
   } finally {
     destroyRuntime();
     shouldClose = true;
     setState(State.STOPPED_WITH_APP_CLOSED);
   }
 }