Author: jonesde
Date: Fri Feb 6 19:45:53 2009
New Revision: 741692
URL:
http://svn.apache.org/viewvc?rev=741692&view=revLog:
Some small changes so that something like the recent nbsp in a labels file won't cause everything to fail, ie just noisily log the error and treat the file/label as missing
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=741692&r1=741691&r2=741692&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Fri Feb 6 19:45:53 2009
@@ -296,7 +296,12 @@
if (existingPropMap == null) {
this.mapNameAcsr.put(context, UtilProperties.getResourceBundleMap(resource, locale, context));
} else {
- existingPropMap.addBottomResourceBundle(resource);
+ try {
+ existingPropMap.addBottomResourceBundle(resource);
+ } catch (IllegalArgumentException e) {
+ // log the error, but don't let it kill everything just for a typo or bad char in an l10n file
+ Debug.logError(e, "Error adding resource bundle [" + resource + "]: " + e.toString(), module);
+ }
}
if (global) {
@@ -308,7 +313,12 @@
} else {
// is it the same object? if not add it in here too...
if (existingPropMap != globalExistingPropMap) {
- globalExistingPropMap.addBottomResourceBundle(resource);
+ try {
+ globalExistingPropMap.addBottomResourceBundle(resource);
+ } catch (IllegalArgumentException e) {
+ // log the error, but don't let it kill everything just for a typo or bad char in an l10n file
+ Debug.logError(e, "Error adding resource bundle [" + resource + "]: " + e.toString(), module);
+ }
}
}
}