Author: jleroux
Date: Fri Mar 31 16:56:04 2017
New Revision: 1789710
URL:
http://svn.apache.org/viewvc?rev=1789710&view=revLog:
Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)
While working on OFBIZ-7759, I stumbled upon this by chance.
It's unlikely that this NumberFormatException is ever caught, but not a reason
to swallow it.
I checked there are no other swallowed exceptions in Groovy files.
Modified:
ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy
Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy?rev=1789710&r1=1789709&r2=1789710&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy Fri Mar 31 16:56:04 2017
@@ -69,7 +69,8 @@ context.curFindString = curFindString
try {
viewSize = Integer.valueOf((String)parameters.get("VIEW_SIZE")).intValue()
} catch (NumberFormatException nfe) {
-
+ Debug.logError(nfe, "Caught an exception : " + nfe.toString(), "GetContentLookupList.groovy")
+ errMsgList.add("Entered value is non-numeric for numeric field: " + field.getName())
}
context.viewSize = viewSize