Commit 4b8853b0 by Mark Wielaard Committed by Michael Koch

ResourceBundle.java (getObject): Clarify MissingResourceException detailed message.

2005-04-29  Mark Wielaard  <mark@klomp.org>

	* java/util/ResourceBundle.java (getObject): Clarify
	MissingResourceException detailed message.
	(tryBundle(String,ClassLoader)): Likewise.

From-SVN: r98976
parent 7789e481
2005-04-29 Mark Wielaard <mark@klomp.org>
* java/util/ResourceBundle.java (getObject): Clarify
MissingResourceException detailed message.
(tryBundle(String,ClassLoader)): Likewise.
2005-04-29 Robert Schuster <thebohemian@gmx.net> 2005-04-29 Robert Schuster <thebohemian@gmx.net>
* java/beans/FeatureDescriptor.java: * java/beans/FeatureDescriptor.java:
......
/* ResourceBundle -- aids in loading resource bundles /* ResourceBundle -- aids in loading resource bundles
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -41,8 +41,6 @@ package java.util; ...@@ -41,8 +41,6 @@ package java.util;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
/** /**
* A resource bundle contains locale-specific data. If you need localized * A resource bundle contains locale-specific data. If you need localized
...@@ -175,9 +173,11 @@ public abstract class ResourceBundle ...@@ -175,9 +173,11 @@ public abstract class ResourceBundle
if (o != null) if (o != null)
return o; return o;
} }
throw new MissingResourceException("Key not found", getClass().getName(), String className = getClass().getName();
key); throw new MissingResourceException("Key '" + key
+ "'not found in Bundle: "
+ className, className, key);
} }
/** /**
...@@ -493,7 +493,7 @@ public abstract class ResourceBundle ...@@ -493,7 +493,7 @@ public abstract class ResourceBundle
catch (IOException ex) catch (IOException ex)
{ {
MissingResourceException mre = new MissingResourceException MissingResourceException mre = new MissingResourceException
("Failed to load bundle", localizedName, ""); ("Failed to load bundle: " + localizedName, localizedName, "");
mre.initCause(ex); mre.initCause(ex);
throw mre; throw mre;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment