diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/AddProgram.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/AddProgram.java index f8f98bc..1d4e2dc 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/AddProgram.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/AddProgram.java @@ -64,7 +64,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to add program: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to add program", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/AddUedExplanation.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/AddUedExplanation.java index 83972b9..5f15f92 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/AddUedExplanation.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/AddUedExplanation.java @@ -64,7 +64,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to add explanation: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to add explanation", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditAccHours.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditAccHours.java index 807e3e1..8005333 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditAccHours.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditAccHours.java @@ -76,7 +76,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit accelerator availability hours: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { Throwable rootCause = ExceptionUtil.getRootCause(e); if (rootCause instanceof SQLException) { diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCcShiftInfo.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCcShiftInfo.java index 061c171..c4fd4d1 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCcShiftInfo.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCcShiftInfo.java @@ -64,7 +64,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit shift info: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to edit shift info", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCrossCheckComment.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCrossCheckComment.java index 2f6523e..dc8e602 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCrossCheckComment.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditCrossCheckComment.java @@ -59,7 +59,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { LOGGER.log(Level.INFO, "Unable to edit shift info: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to edit shift info", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpHours.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpHours.java index c6f52d3..fc45012 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpHours.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpHours.java @@ -88,7 +88,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit availability hours: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { Throwable rootCause = ExceptionUtil.getRootCause(e); if (rootCause instanceof SQLException) { diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpShiftInfo.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpShiftInfo.java index 3a8552f..221113c 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpShiftInfo.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditExpShiftInfo.java @@ -66,7 +66,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit shift info: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to edit shift info", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditHallHours.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditHallHours.java index 459675c..d659785 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditHallHours.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditHallHours.java @@ -75,7 +75,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit hall availability hours: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { Throwable rootCause = ExceptionUtil.getRootCause(e); if (rootCause instanceof SQLException) { diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditMultiHours.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditMultiHours.java index 1043eec..ef76e28 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditMultiHours.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditMultiHours.java @@ -81,7 +81,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit multiplicity hours: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { Throwable rootCause = ExceptionUtil.getRootCause(e); if (rootCause instanceof SQLException) { diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditProgram.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditProgram.java index 770ed0a..8c67dbb 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditProgram.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditProgram.java @@ -63,7 +63,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit program: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to edit program", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditReviewerComment.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditReviewerComment.java index 65f69a8..acc3f31 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditReviewerComment.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditReviewerComment.java @@ -59,7 +59,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { LOGGER.log(Level.INFO, "Unable to edit shift info: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to edit shift info", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditScheduleRow.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditScheduleRow.java index b86c2cd..e0dffb7 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/EditScheduleRow.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/EditScheduleRow.java @@ -145,9 +145,9 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) } catch (EJBAccessException e) { logger.log(Level.WARNING, "Unable to edit schedule row due to access exception", e); errorReason = "Access Denied"; - } catch (UserFriendlyException | IllegalArgumentException e) { + } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to edit schedule row: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { Throwable rootCause = ExceptionUtil.getRootCause(e); if (rootCause instanceof SQLException) { diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveProgram.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveProgram.java index ca5c80a..8680cfa 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveProgram.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveProgram.java @@ -58,7 +58,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to remove program: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to remove program", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveUedExplanation.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveUedExplanation.java index 2c75745..ff92bb0 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveUedExplanation.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/RemoveUedExplanation.java @@ -63,7 +63,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to add explanation: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to add explanation", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/SignCcTimesheet.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/SignCcTimesheet.java index 8ea0727..b03d7a5 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/SignCcTimesheet.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/SignCcTimesheet.java @@ -122,7 +122,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to sign timesheet: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to sign timesheet", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/SignExpTimesheet.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/SignExpTimesheet.java index 10477ba..2a2ff42 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/SignExpTimesheet.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/SignExpTimesheet.java @@ -144,7 +144,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { logger.log(Level.INFO, "Unable to sign timesheet: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to sign timesheet", e); Throwable rootCause = ExceptionUtil.getRootCause(e); diff --git a/src/main/java/org/jlab/btm/presentation/controller/ajax/Upload.java b/src/main/java/org/jlab/btm/presentation/controller/ajax/Upload.java index ea15ec9..30aa539 100644 --- a/src/main/java/org/jlab/btm/presentation/controller/ajax/Upload.java +++ b/src/main/java/org/jlab/btm/presentation/controller/ajax/Upload.java @@ -71,7 +71,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) errorReason = "Access Denied"; } catch (UserFriendlyException e) { LOGGER.log(Level.INFO, "Unable to upload: {0}", e.getMessage()); - errorReason = e.getMessage(); + errorReason = e.getUserMessage(); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unable to upload", e); Throwable rootCause = ExceptionUtil.getRootCause(e);