Task subtask = (Task) tasks.nextElement(); System.out.println("subtask added: " + format(subtask)); aggregateSubtask(subtask);
Task subTask = (Task) tasks.nextElement(); try { checkTaskValid(subTask); System.out.println("subTask added: " + format(subTask)); aggregateSubtask(subTask); } catch (RuntimeException re) { System.err.println("handleSubTasksAdded: " + re); failTask(subTask); }
    private void handleSubTasksAdded(Enumeration tasks) {        while (tasks.hasMoreElements()) {            Task subtask = (Task) tasks.nextElement();            System.out.println("subtask added: " + format(subtask));            aggregateSubtask(subtask);        }    }