Author: hansbak
Date: Thu Apr 2 06:20:59 2009
New Revision: 761178
URL:
http://svn.apache.org/viewvc?rev=761178&view=revLog:
give error message instead of NPE
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java?rev=761178&r1=761177&r2=761178&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormFactory.java Thu Apr 2 06:20:59 2009
@@ -79,6 +79,9 @@
*/
URL formFileUrl = FlexibleLocation.resolveLocation(resourceName); //, loader);
Document formFileDoc = UtilXml.readXmlDocument(formFileUrl, true);
+ if (formFileDoc == null) {
+ throw new IllegalArgumentException("Could not find resource [" + resourceName + "]");
+ }
modelForm = createModelForm(formFileDoc, entityModelReader, dispatchContext, resourceName, formName);
formLocationCache.put(cacheKey, modelForm);
}