protected void handleResponseBeanValidationErrorException(Object bean, Consumer<ExceptionMessageBuilder> locationBuilder,
            UserMessages messages, RuntimeException cause) {
        // cause is completely framework info so not show it
        final String msg = buildValidationErrorMessage(bean, locationBuilder, messages);
        if (warning) {
            logger.warn(msg);
        } else { // but keep framework information for various purpose of client
            throw new ResponseBeanValidationErrorException(msg, bean, messages);
        }
    }
protected void handleResponseBeanValidationErrorException ( Object bean , Consumer < ExceptionMessageBuilder > locationBuilder , UserMessages messages , RuntimeException cause ) { final String msg = buildValidationErrorMessage ( bean , locationBuilder , messages ) ; if ( warning ) { logger . warn ( msg ) ; } else { throw new ResponseBeanValidationErrorException ( msg , bean , messages ) ; } }
================