Package java.util

Examples of java.util.MissingResourceException


            } catch (MissingResourceException mse) {
            }
        }

        if (fatal)
            throw new MissingResourceException(key, getClass().getName(), key);
        return null;
    }
View Full Code Here


                errs.append(_derivations[i].getClass().getName() + ":" + t);
            }
        }
        reportErrors(errs, resource, err);
        String rsrc = resource + "#" + anchor;
        MissingResourceException ex = new MissingResourceException(rsrc,
                ProductDerivations.class.getName(), rsrc);
        ex.initCause(err);
        throw ex;
    }
View Full Code Here

        }
        String aPath = AccessController.doPrivileged(
            J2DoPrivHelper.getAbsolutePathAction(file));
        reportErrors(errs, aPath, err);
        String rsrc = aPath + "#" + anchor;
        MissingResourceException ex = new MissingResourceException(rsrc,
                ProductDerivations.class.getName(), rsrc);
        ex.initCause(err);
        throw ex;
    }
View Full Code Here

     */
    private static void reportErrors(StringBuilder errs, String resource,
        Throwable nested) {
        if (errs == null)
            return;
        MissingResourceException ex = new MissingResourceException(errs.toString(),
                ProductDerivations.class.getName(), resource);
        ex.initCause(nested);
        throw ex;
    }
View Full Code Here

                    provider = ProductDerivations.load(path, anchor, null);
            }
            if (provider != null)
                provider.setInto(conf);
            else
                throw new MissingResourceException(_loc.get("no-provider",
                    props).getMessage(), Configurations.class.getName(),
                    props);
        } else {
            provider = ProductDerivations.loadDefaults(null);
            if (provider != null)
View Full Code Here

        if (idx != -1) {
            if (idx < path.length() - 1)
                anchor = path.substring(idx + 1);
            path = path.substring(0, idx);
            if (path.length() == 0)
                throw new MissingResourceException(_loc.get("anchor-only",
                    props).getMessage(), Configurations.class.getName(),
                    props);
        }
        Map <String, String> result = new HashMap<String, String>();
        result.put(CONFIG_RESOURCE_PATH, path);
View Full Code Here

        message.append(component.getPageRelativePath());
        message.append(" [class=").append(component.getClass().getName()).append(']');
      }
      message.append(". Locale: ").append(locale).append(", style: ").append(style);

      throw new MissingResourceException(message.toString(), (component != null
        ? component.getClass().getName() : ""), key);
    }

    return "[Warning: Property for '" + key + "' not found]";
  }
View Full Code Here

    String name = reference.getName();
    String message = prefix + reference.toString();

    if (getThrowExceptionOnMissingResource())
    {
      throw new MissingResourceException(message, scope, name);
    }
    else if (log.isWarnEnabled())
    {
      log.warn(message);
    }
View Full Code Here

    {
        try
        {
            String res = resBundle.getString(key);
            if (res==null)
                throw new MissingResourceException("Message Key not found.", String.class.getSimpleName(), key);
            return res;
        }
        catch (MissingResourceException e)
        {
            log.error("Message key missing '{}'.", key);
View Full Code Here

        }

        // error
        catch (MissingResourceException e) {
            msg = fResourceBundle.getString("BadMessageKey");
            throw new MissingResourceException(key, msg, key);
        }

        // no message
        if (msg == null) {
            msg = key;
View Full Code Here

TOP

Related Classes of java.util.MissingResourceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.