private void handleInferenceAnswerResult(CycList data) {
    if (data.size() != 2) {
      throw new RuntimeException("Got wrong number of arguments " + "from inference result (expected 2): " + data);
    }
    Object newAnswers = data.get(1);
    if ((newAnswers == null) || (!(newAnswers instanceof CycList))) {
      throw new RuntimeException("Got bad inference answers list: " + newAnswers);
    }
    answers.addAll((List) newAnswers);
    Object[] curListeners = getInferenceListeners();
    List<Exception> errors = new ArrayList<Exception>();
    for (int i = curListeners.length - 1; i >= 0; i -= 1) {
       try {
        ((InferenceWorkerListener) curListeners[i]).notifyInferenceAnswersAvailable(this, (List) newAnswers);
      } catch (Exception e) {
        errors.add(e);
      }
    }
    if (errors.size() > 0) {
      throw new RuntimeException(errors.get(0)); // @hack
    }
  }