Code example for MissingResourceException

Methods: getMessage

0
 
    public String getString(String key) {
        try { 
            return bundle.getString(key);
        } catch (MissingResourceException ex) {
            System.out.println(ex.getMessage());
        } 
        return "###"; 
    } 
 
    public String getFormatedString(String key, Object... values) {
        return String.format(getLocale(), bundle.getString(key), values).toString();
    } 
}