} catch (FenixServiceException e) { e.printStackTrace(); if (e.getMessage() != null && e.getMessage().endsWith("noCurricularPlans")) { addActionMessage(request, e.getMessage(), studentNumber.toString()); } else if (e.getMessage() != null && !e.getMessage().endsWith("noCurricularPlans")) { addActionMessage(request, e.getMessage()); } else { addActionMessage(request, "error.impossible.operations"); } return mapping.getInputForward(); }
} catch (NotAuthorizedFilterException e) { e.printStackTrace(); addActionMessage(request, "error.exception.notAuthorized2"); return mapping.getInputForward();
	public ActionForward enrollCourses(ActionMapping mapping, ActionForm actionForm,			HttpServletRequest request, HttpServletResponse response) throws Exception {		final DynaActionForm form = (DynaActionForm) actionForm;		final Integer studentNumber = Integer.valueOf(form.getString("studentNumber"));		final List<String> curricularCourses = Arrays.asList((String[]) form.get("curricularCourses"));		final Map optionalEnrollments = (HashMap) form.get("enrollmentTypes");				try {			ServiceManagerServiceFactory.executeService(getUserView(request), "WriteEnrollmentsList",					new Object[] { getStudent(form), getDegreeType(form), getExecutionPeriod(form), curricularCourses,							optionalEnrollments, getUserView(request) });		} catch (NotAuthorizedFilterException e) {			e.printStackTrace();			addActionMessage(request, "error.exception.notAuthorized2");			return mapping.getInputForward();		} catch (FenixServiceException e) {			e.printStackTrace();			if (e.getMessage() != null && e.getMessage().endsWith("noCurricularPlans")) {				addActionMessage(request, e.getMessage(), studentNumber.toString());			} else if (e.getMessage() != null && !e.getMessage().endsWith("noCurricularPlans")) {				addActionMessage(request, e.getMessage());			} else {				addActionMessage(request, "error.impossible.operations");			}			return mapping.getInputForward();		}		return mapping.findForward("readCurricularCourseEnrollmentList");	}