/** * Return default exception message. */ protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return ex.getMessage(); }
/** * Return default exception message. */ protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return ex.getMessage(); }
/** * Return exception message that indicates the current theme. */ @Override protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage(); }
/** * Return exception message that indicates the current theme. */ @Override protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage(); }
return messageSource.getMessage((String) key, null, locale); } catch (NoSuchMessageException ex) { logger.warn(ex.getMessage()); return (String) key;
/** * Return default exception message. */ protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return ex.getMessage(); }
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return ex.getMessage(); } }
public String getMessage(String code) { try { return messageSource.getMessage(code, null, forLanguageTag("en")); } catch (NoSuchMessageException e) { log.info("Can't get message: {}", e.getMessage()); } return null; } }
public String getMessage(String code) { try { return messageSource.getMessage(code, null, forLanguageTag("en")); } catch (NoSuchMessageException e) { log.info("Can't get message: {}", e.getMessage()); } return null; } }
public String getMessage(String code) { try { return messageSource.getMessage(code, null, forLanguageTag("en")); } catch (NoSuchMessageException e) { log.info("Can't get message: {}", e.getMessage()); } return null; } }
public String getPropertyMessage(String key, Object[] args, Locale locale) { String msg; try { msg = getMessage(key, args, locale); } catch (NoSuchMessageException e) { throw new MissingResourceException("Cannot find key ("+key+"): " + e.getMessage(), SpringMessageBundle.class.getName(), key); } return msg; } public List<String> getPropertyKeys(Locale locale) {
/** * Return exception message that indicates the current theme. */ @Override protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage(); }
} catch (NoSuchMessageException e) { log.error(String.format("Could not interpolate message \"%s\" for validator. " + e.getMessage(), constraintViolation.getMessage()), e); message = constraintViolation.getMessage();
@Override protected void handleNoSuchMessageException(MessageSourceResolvable resolvable, NoSuchMessageException exception) { if (this.context.isProjectStage(ProjectStage.Production)) { throw exception; } String message = exception.getMessage(); String[] codes = resolvable.getCodes(); if (codes != null && codes.length > 1) { message = message + " Attempted to resolve message with the following codes '" + StringUtils.arrayToDelimitedString(codes, ", ") + "'"; } if (UIMessageSource.this.logger.isWarnEnabled()) { UIMessageSource.this.logger.warn(message, exception); } FacesMessage facesMessage = new FacesMessage(message); facesMessage.setSeverity(FacesMessage.SEVERITY_WARN); this.context.addMessage(UIMessageSource.this.getClientId(this.context), facesMessage); }