Java Code Examples for org.springframework.context.NoSuchMessageException#getMessage()

The following examples show how to use org.springframework.context.NoSuchMessageException#getMessage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EntityPropertiesServiceSpringImpl.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
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;
}
 
Example 2
Source File: EntityPropertiesServiceSpringImpl.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
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;
}
 
Example 3
Source File: MessageTag.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * Return default exception message.
 */
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return ex.getMessage();
}
 
Example 4
Source File: ThemeTag.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * Return exception message that indicates the current theme.
 */
@Override
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage();
}
 
Example 5
Source File: MessageTag.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * Return default exception message.
 */
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return ex.getMessage();
}
 
Example 6
Source File: ThemeTag.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * Return exception message that indicates the current theme.
 */
@Override
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage();
}
 
Example 7
Source File: MessageTag.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Return default exception message.
 */
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return ex.getMessage();
}
 
Example 8
Source File: ThemeTag.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Return exception message that indicates the current theme.
 */
@Override
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage();
}
 
Example 9
Source File: MessageTag.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * Return default exception message.
 */
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return ex.getMessage();
}
 
Example 10
Source File: ThemeTag.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * Return exception message that indicates the current theme.
 */
@Override
protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) {
	return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage();
}