diff options
Diffstat (limited to 'eaaf_core')
-rw-r--r-- | eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java | 50 |
1 files changed, 16 insertions, 34 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java index c666eaa9..4ac8bba2 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java @@ -310,45 +310,27 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer @Override public void handleErrorNoRedirect(final Throwable throwable, final HttpServletRequest req, - final HttpServletResponse resp, final boolean writeExceptionToStatisticLog) { - handleErrorNoRedirect(throwable, req, resp, writeExceptionToStatisticLog, false); - } + final HttpServletResponse resp, final boolean writeExceptionToStatisticLog) throws EaafException, IOException { - private void handleErrorNoRedirect(final Throwable throwable, final HttpServletRequest req, - final HttpServletResponse resp, final boolean writeExceptionToStatisticLog, final boolean recall) { ErrorTicketService.HandleData errorData = null; - try { - errorData = errorTicketService.createHandleData(throwable, req); + errorData = errorTicketService.createHandleData(throwable, req); - // log Exception into statistic database - if (writeExceptionToStatisticLog) { - statisticLogger.logErrorOperation(throwable); - } + // log Exception into statistic database + if (writeExceptionToStatisticLog) { + statisticLogger.logErrorOperation(throwable); + } - // write errror to console - logExceptionToTechnicalLog(errorData); + // write errror to console + logExceptionToTechnicalLog(errorData); - if (errorData.getActionType().equals(ErrorTicketService.ActionType.NOTICKET_NOREDIRECT) || errorData - .getActionType().equals(ErrorTicketService.ActionType.TICKET_NOREDIRECT) || recall) { - // return error to Web browser - displayException(req, resp, errorData); - } else { - // TODO introduce separate error type? - throw new EaafException("internal.configuration.01", new Object[]{ - errorData.getErrorCode() + " in on_error_action" + ".properties", "Erroraction mapping mismatch"}); - } - - } catch (EaafException e) { - // retry - if (recall) { - handleErrorNoRedirect(e, req, resp, writeExceptionToStatisticLog, true); - } - } catch (IOException e) { - // retry - if (recall) { - handleErrorNoRedirect(new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_GENERIC, null, e), req, resp, - writeExceptionToStatisticLog, true); - } + if (errorData.getActionType().equals(ErrorTicketService.ActionType.NOTICKET_NOREDIRECT) || errorData.getActionType() + .equals(ErrorTicketService.ActionType.TICKET_NOREDIRECT)) { + // return error to Web browser + displayException(req, resp, errorData); + } else { + // TODO introduce separate error type? + throw new EaafException("internal.configuration.01", new Object[]{ + errorData.getErrorCode() + " in on_error_action" + ".properties", "Erroraction mapping mismatch"}); } } |