Skip to content

Commit

Permalink
Merge pull request #5411 from eclipse-ee4j/mojarra_issue_5404_reduce_…
Browse files Browse the repository at this point in the history
…logging_level_of_exception_which_is_already_rethrown

Reduce logging level of exception which is already rethrown
  • Loading branch information
arjantijms authored Mar 4, 2024
2 parents 427b255 + 5ed5652 commit ac4719d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public void execute(FacesContext facesContext) throws FacesException {
} catch (RuntimeException re) {
String exceptionMessage = re.getMessage();
if (null != exceptionMessage) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, exceptionMessage, re);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, exceptionMessage, re);
}
}
throw new FacesException(exceptionMessage, re);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void execute(FacesContext facesContext) throws FacesException {
} catch (RuntimeException re) {
String exceptionMessage = re.getMessage();
if (null != exceptionMessage) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, exceptionMessage, re);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, exceptionMessage, re);
}
}
throw new FacesException(exceptionMessage, re);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void execute(FacesContext facesContext) throws FacesException {
} catch (RuntimeException re) {
String exceptionMessage = re.getMessage();
if (null != exceptionMessage) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, exceptionMessage, re);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, exceptionMessage, re);
}
}
throw new FacesException(exceptionMessage, re);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public void execute(FacesContext facesContext) {
} catch (RuntimeException re) {
String exceptionMessage = re.getMessage();
if (null != exceptionMessage) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING, exceptionMessage, re);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, exceptionMessage, re);
}
}
throw new FacesException(exceptionMessage, re);
Expand Down

0 comments on commit ac4719d

Please sign in to comment.