incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1222541 - /incubator/lcf/branches/CONNECTORS-335/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
Date Fri, 23 Dec 2011 03:25:06 GMT
Author: kwright
Date: Fri Dec 23 03:25:06 2011
New Revision: 1222541

URL: http://svn.apache.org/viewvc?rev=1222541&view=rev
Log:
Disable fatal exception if resource bundle is not found - just print the message key instead

Modified:
    incubator/lcf/branches/CONNECTORS-335/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java

Modified: incubator/lcf/branches/CONNECTORS-335/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java?rev=1222541&r1=1222540&r2=1222541&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
(original)
+++ incubator/lcf/branches/CONNECTORS-335/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
Fri Dec 23 03:25:06 2011
@@ -107,13 +107,16 @@ public class Messages
     catch (MissingResourceException e)
     {
       // Use English if we don't have a bundle for the current locale
-      Logging.misc.warn("Missing resource bundle '" + bundleName + "' for locale '"+locale.toString()+"'");
-      resources = ResourceBundle.getBundle(bundleName, Locale.US, classLoader);
-    }
-    if (resources == null)
-    {
-      Logging.misc.fatal("No US bundle found!");
-      return messageKey;
+      Logging.misc.warn("Missing resource bundle '" + bundleName + "' for locale '"+locale.toString()+"':
"+e.getMessage());
+      try
+      {
+        resources = ResourceBundle.getBundle(bundleName, Locale.US, classLoader);
+      }
+      catch (MissingResourceException e2)
+      {
+        Logging.misc.fatal("No US bundle found either!");
+        return messageKey;
+      }
     }
     
     String message;



Mime
View raw message