private void handleWrappedException(WrappedException ex) {
   Status errorStatus =
       new Status(
           Status.ERROR,
           Activator.PLUGIN_ID,
           ERROR_DURING_SIMULATION,
           ex.getCause().getMessage(),
           ex.getCause());
   IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(errorStatus);
   try {
     statusHandler.handleStatus(errorStatus, getDebugTarget());
     interpreter.suspend();
     interpreter.tearDown();
   } catch (CoreException e) {
     e.printStackTrace();
   }
 }
 public void terminate() {
   terminated = true;
   interpreter.tearDown();
 }