throw new FenixServiceException("Error calculating exams season");
throw new FenixServiceException("Error calculating exams season", e);
    private Period calculateExamsSeason(IExecutionPeriod executionPeriod) throws Exception {        try {            ISuportePersistente sp = SuportePersistenteOJB.getInstance();            int semester = executionPeriod.getSemester().intValue();            List executionDegreesList = sp.getIPersistentExecutionDegree().readByExecutionYear(                    executionPeriod.getExecutionYear().getYear());            ICursoExecucao executionDegree = (ICursoExecucao) executionDegreesList.get(0);            Calendar startSeason1 = null;            Calendar endSeason2 = null;            if (semester == 1) {                startSeason1 = executionDegree.getPeriodExamsFirstSemester().getStartDate();                endSeason2 = executionDegree.getPeriodExamsFirstSemester().getEndDateOfComposite();            } else {                startSeason1 = executionDegree.getPeriodExamsSecondSemester().getStartDate();                endSeason2 = executionDegree.getPeriodExamsSecondSemester().getEndDateOfComposite();            }            for (int i = 1; i < executionDegreesList.size(); i++) {                executionDegree = (ICursoExecucao) executionDegreesList.get(i);                Calendar startExams;                Calendar endExams;                if (semester == 1) {                    startExams = executionDegree.getPeriodExamsFirstSemester().getStartDate();                    endExams = executionDegree.getPeriodExamsFirstSemester().getEndDateOfComposite();                } else {                    startExams = executionDegree.getPeriodExamsSecondSemester().getStartDate();                    endExams = executionDegree.getPeriodExamsSecondSemester().getEndDateOfComposite();                }                if (startExams.before(startSeason1)) {                    startSeason1 = startExams;                }                if (endExams.after(endSeason2)) {                    endSeason2 = endExams;                }            }            return new Period(startSeason1, endSeason2);        } catch (Exception e) {            throw new FenixServiceException("Error calculating exams season");        }    }