Author: jleroux
Date: Tue Mar 21 08:40:07 2017 New Revision: 1787906 URL: http://svn.apache.org/viewvc?rev=1787906&view=rev Log: No functional changes, fixes a bunch of swallowed exceptions Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1787906&r1=1787905&r2=1787906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Tue Mar 21 08:40:07 2017 @@ -2214,10 +2214,10 @@ public class ProductionRunServices { } } } - } catch (GenericEntityException gee) { - - } catch (GenericServiceException gee) { - + } catch (GenericEntityException | GenericServiceException e) { + String errMsg = "Problem calling the updateProductionRunTaskStatus service"; + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); } } } @@ -2264,7 +2264,10 @@ public class ProductionRunServices { GenericValue requirement = null; try { requirement = EntityQuery.use(delegator).from("Requirement").where("requirementId", requirementId).queryOne(); - } catch (GenericEntityException gee) { + } catch (GenericEntityException e) { + String errMsg = "Problem calling the approveRequirement service"; + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); } if (requirement == null) { @@ -2295,7 +2298,10 @@ public class ProductionRunServices { GenericValue requirement = null; try { requirement = EntityQuery.use(delegator).from("Requirement").where("requirementId", requirementId).queryOne(); - } catch (GenericEntityException gee) { + } catch (GenericEntityException e) { + String errMsg = "Problem calling the createProductionRunFromRequirement service"; + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); } if (requirement == null) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingRequirementNotExists", locale)); Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1787906&r1=1787905&r2=1787906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java Tue Mar 21 08:40:07 2017 @@ -1624,7 +1624,8 @@ public class ShoppingCartEvents { .filterByDate() .queryList(); } catch (GenericEntityException gee) { - // + request.setAttribute("_ERROR_MESSAGE_", gee.getMessage()); + return "error"; } if (UtilValidate.isNotEmpty(storeReps)) { hasPermission = true; @@ -1674,7 +1675,8 @@ public class ShoppingCartEvents { try { thisUserLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", userLoginId).queryOne(); } catch (GenericEntityException gee) { - // + request.setAttribute("_ERROR_MESSAGE_", gee.getMessage()); + return "error"; } if (thisUserLogin != null) { partyId = thisUserLogin.getString("partyId"); @@ -1687,7 +1689,8 @@ public class ShoppingCartEvents { try { thisParty = EntityQuery.use(delegator).from("Party").where("partyId", partyId).queryOne(); } catch (GenericEntityException gee) { - // + request.setAttribute("_ERROR_MESSAGE_", gee.getMessage()); + return "error"; } if (thisParty == null) { request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resource_error,"OrderCouldNotLocateTheSelectedParty", locale)); Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=1787906&r1=1787905&r2=1787906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java Tue Mar 21 08:40:07 2017 @@ -516,6 +516,7 @@ public class ShoppingCartHelper { try { requirement = EntityQuery.use(delegator).from("Requirement").where("requirementId", requirementId).queryOne(); } catch (GenericEntityException gee) { + Debug.logError(gee, module); } if (requirement == null) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, |
Free forum by Nabble | Edit this page |