You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2005/10/12 04:19:46 UTC
svn commit: r314752 - in /cocoon/trunk/src/java/org/apache/cocoon/i18n:
XMLResourceBundleFactory.java XMLResourceBundleNotFoundException.java
Author: vgritsenko
Date: Tue Oct 11 19:19:40 2005
New Revision: 314752
URL: http://svn.apache.org/viewcvs?rev=314752&view=rev
Log:
Fix compilation error.
Remove XMLResourceBundleNotFoundException - not needed.
Removed:
cocoon/trunk/src/java/org/apache/cocoon/i18n/XMLResourceBundleNotFoundException.java
Modified:
cocoon/trunk/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java
Modified: cocoon/trunk/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java?rev=314752&r1=314751&r2=314752&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java Tue Oct 11 19:19:40 2005
@@ -26,6 +26,8 @@
import org.apache.avalon.framework.service.Serviceable;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceNotFoundException;
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.store.Store;
@@ -223,7 +225,7 @@
*/
private XMLResourceBundle _select(String[] directories, int index, String name,
Locale locale)
- throws ComponentException {
+ throws Exception {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Selecting from: " + name + ", locale: " + locale +
", directory: " + directories[index]);
@@ -310,7 +312,8 @@
* Creates a cache key for the bundle.
* @return the cache key
*/
- protected String getCacheKey(String[] directories, int index, String name, Locale locale) {
+ protected String getCacheKey(String[] directories, int index, String name, Locale locale)
+ throws SourceException {
StringBuffer cacheKey = new StringBuffer("XRB");
for (; index < directories.length; index++) {
cacheKey.append(":");
@@ -328,7 +331,8 @@
* @param locale the locale of the bundle
* @return the source URI for the bundle
*/
- protected String getSourceURI(String base, String name, Locale locale) {
+ protected String getSourceURI(String base, String name, Locale locale)
+ throws SourceException {
// If base is null default to the current location
if (base == null) {
base = "";
@@ -344,7 +348,7 @@
}
this.resolver.release(src);
} catch (IOException e) {
- throw new CascadingRuntimeException("Cannot resolve " + base, e);
+ throw new SourceNotFoundException("Cannot resolve catalogue base URI <" + base + ">", e);
}
sb.append(name);