Package java.util

Examples of java.util.MissingResourceException


        }

        if (msg == null) {
            msg = fResourceBundle.getString("BadMessageKey");
          //MF
            throw new MissingResourceException(msg,
                    "mf.org.apache.xerces.impl.msg.XPointerMessages", key);
        }

        return msg;
    }
View Full Code Here


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

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

        }

        if (msg == null) {
            msg = fResourceBundle.getString("BadMessageKey");
          //MF
            throw new MissingResourceException(msg, "mf.org.apache.xerces.impl.msg.SchemaMessages", key);
        }

        return msg;
    }
View Full Code Here

        ResourceBundle resourceBundle = getResourceBundle(domain);
        if(resourceBundle == null){
            init();
            resourceBundle = getResourceBundle(domain);
            if(resourceBundle == null)
                throw new MissingResourceException("Unknown domain" + domain, null, key);
        }
        // format message
        String msg;
        try {
            msg = key + ": " + resourceBundle.getString(key);
            if (arguments != null) {
                try {
                    msg = java.text.MessageFormat.format(msg, arguments);
                }
                catch (Exception e) {
                    msg = resourceBundle.getString("FormatFailed");
                    msg += " " + resourceBundle.getString(key);
                }
            }
        } // error
        catch (MissingResourceException e) {
            msg = resourceBundle.getString("BadMessageKey");
            throw new MissingResourceException(key, msg, key);
        }
       
        // no message
        if (msg == null) {
            msg = key;
View Full Code Here

        for (Object component : componentSet) {
            // see if provided type matches the component
            if (type.isAssignableFrom(component.getClass())) {
                // if this isn't the first match, it's an error
                if (matchingComponent != null) {
                    throw new MissingResourceException("More than one " +
                                                       "matching component",
                                                       type.getName(), null);
                }
                matchingComponent = component;
            }
        }

        // if no matches were found, it's an error
        if (matchingComponent == null) {
            throw new MissingResourceException("No matching components",
                                               type.getName(), null);
        }

        return type.cast(matchingComponent);
    }
View Full Code Here

        ResourceBundle resourceBundle = null;
      //MF
        resourceBundle = ResourceBundle.getBundle("mf.org.apache.xerces.impl.msg.XMLSchemaMessages");
      //MF
        if (resourceBundle == null)
            throw new MissingResourceException("Property file not found!", "mf.org.apache.xerces.impl.msg.XMLSchemaMessages", key);

        String msg = resourceBundle.getString(key);
        if (msg == null) {
            msg = resourceBundle.getString("BadMessageKey");
          //MF
            throw new MissingResourceException(msg, "mf.org.apache.xerces.impl.msg.XMLSchemaMessages", key);
        }

        if (args != null) {
            try {
                msg = java.text.MessageFormat.format(msg, args);
View Full Code Here

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

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

        }

        if (msg == null) {
            msg = fResourceBundle.getString("BadMessageKey");
          //MF
            throw new MissingResourceException(msg, "mf.org.apache.xerces.impl.msg.XIncludeMessages", key);
        }

        return msg;
    }
View Full Code Here

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

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

                            parentBundle = bundle;
                            bundle = lookupBundle;
                        }
                    }
                    if (bundle == null) {
                        throw new MissingResourceException("Resource " + resource + ", locale " + locale + " not found", null, null);
                    } else if (!bundle.getLocale().equals(locale)) {
                        // Create a "dummy" bundle for the requested locale
                        bundle = new UtilResourceBundle(bundle.properties, locale, parentBundle);
                    }
                    double totalTime = System.currentTimeMillis() - startTime;
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.