Author: jleroux Date: Fri Feb 16 08:53:20 2018 New Revision: 1824434 URL: http://svn.apache.org/viewvc?rev=1824434&view=rev Log: Improved: Fix Default or Empty Catch block in Java and Groovy files (OFBIZ-8341)
Improves this "catch NumberFormatException", better message and return Thanks: Michael Brohl for review Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy?rev=1824434&r1=1824433&r2=1824434&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy Fri Feb 16 08:53:20 2018 @@ -217,9 +217,9 @@ if (productIdToReceive) { try { quantity = Double.parseDouble(productQtyToReceive) } catch (NumberFormatException nfe) { - // Ignore the quantity update if there's a problem parsing it Debug.logError(nfe, "Caught an exception : " + nfe.toString(), module) - request.setAttribute("_ERROR_MESSAGE", "An exception occured please check the log") + request.setAttribute("_ERROR_MESSAGE", "The quantity to update seems non-numeric") + return } }