svn commit: r1761124 - /ofbiz/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1761124 - /ofbiz/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java

jleroux@apache.org
Author: jleroux
Date: Sat Sep 17 06:31:11 2016
New Revision: 1761124

URL: http://svn.apache.org/viewvc?rev=1761124&view=rev
Log:
Improves: Clean up commented out code in Java source for Manufacturing
(OFBIZ-7848)

As per discussion provided patch to add the log statements in catch block to avoid silent exceptions.

jleroux: I had these pending for a moment because I also changed a "if (Debug.infoOn()) Debug.logInfo" to always print an error in case of catched exception

Thanks: Harsh Vijaywargiya


Modified:
    ofbiz/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java

Modified: ofbiz/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java?rev=1761124&r1=1761123&r2=1761124&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java Sat Sep 17 06:31:11 2016
@@ -292,7 +292,7 @@ public class BOMNode {
                                         variantProduct = variantProducts.get(0);
                                     }
                                 } catch (GenericServiceException e) {
-                                    if (Debug.infoOn()) Debug.logInfo("Error calling getProductVariant service " + e.getMessage(), module);
+                                    Debug.logError("Error calling getProductVariant service " + e.getMessage(), module);
                                 }
                                 if (variantProduct != null) {
                                     newNode = new BOMNode(variantProduct, dispatcher, userLogin);
@@ -433,7 +433,7 @@ public class BOMNode {
                     this.quantity = calcQuantity;
                 }
             } catch (GenericServiceException e) {
-                
+                Debug.logError(e, "Problem calling the " + serviceName + " service (called by the createManufacturingOrder service)", module);
             }
         } else {
             this.quantity = quantity.multiply(quantityMultiplier).multiply(scrapFactor);
@@ -573,7 +573,7 @@ public class BOMNode {
                     }
                 }
             } catch (GenericEntityException e) {
-                
+                Debug.logError(e, "Problem calling the getManufacturingComponents service", module);
             }
         }
         return UtilMisc.toMap("productionRunId", productionRunId, "endDate", endDate);