eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
160 stars 109 forks source link

Faces Lifecycle LOGGER log exceptions at WARNING Level #5404

Closed pizzi80 closed 6 months ago

pizzi80 commented 7 months ago

Describe the bug

Faces internal LIFECYCLE LOGGER

log at WARNING Level the exception before re-throw it as FacesException

For example inside the class InvokeApplicationPhase

try {
    root.processApplication(facesContext);
} catch (RuntimeException re) {
    String exceptionMessage = re.getMessage();
    if (null != exceptionMessage) {
        if (LOGGER.isLoggable(Level.WARNING)) {
            LOGGER.log(Level.WARNING, exceptionMessage, re);
        }
    }
    throw new FacesException(exceptionMessage, re);
}

Expected behavior

do NOT log it or log at FINE(er)? level... ?

Additional context

https://stackoverflow.com/questions/46241248/jsf-warning-is-logged-before-custom-exception-handler-is-called-glassfish-payar

BalusC commented 7 months ago

Agreed. It's rethrown not suppressed.