Author: jleroux
Date: Tue Mar 21 09:19:51 2017 New Revision: 1787914 URL: http://svn.apache.org/viewvc?rev=1787914&view=rev Log: "Applied fix from trunk framework for revision: 1787907" ------------------------------------------------------------------------ r1787907 | jleroux | 2017-03-21 09:42:57 +0100 (mar. 21 mars 2017) | 1 ligne No functional changes, improves a bunch of exceptions ------------------------------------------------------------------------ Modified: ofbiz/branches/release16.11/ (props changed) ofbiz/branches/release16.11/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java ofbiz/branches/release16.11/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ReplaceImage.java Propchange: ofbiz/branches/release16.11/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Mar 21 09:19:51 2017 @@ -10,5 +10,5 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787627,1787823,1787906 +/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787627,1787823,1787906-1787907 /ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520 Modified: ofbiz/branches/release16.11/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java?rev=1787914&r1=1787913&r2=1787914&view=diff ============================================================================== --- ofbiz/branches/release16.11/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java (original) +++ ofbiz/branches/release16.11/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java Tue Mar 21 09:19:51 2017 @@ -1851,8 +1851,10 @@ public class OrderReturnServices { GenericValue newOrderItemShipGroupAssoc = delegator.makeValue("OrderItemShipGroupAssoc", UtilMisc.toMap("orderItemSeqId", newItem.getString("orderItemSeqId"), "shipGroupSeqId", orderItemShipGroupAssoc.getString("shipGroupSeqId"), "quantity", quantity)); orderItemShipGroupInfo.add(newOrderItemShipGroupAssoc); } - } catch (GenericEntityException gee) { - Debug.logError(gee, module); + } catch (GenericEntityException e) { + String errMsg = "Problem calling the approveRequirement service"; + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); } // Create an association between the replacement order item and the order item of the original order GenericValue newOrderItemAssoc = delegator.makeValue("OrderItemAssoc", UtilMisc.toMap("orderId", orderHeader.getString("orderId"), Modified: ofbiz/branches/release16.11/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ReplaceImage.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ReplaceImage.java?rev=1787914&r1=1787913&r2=1787914&view=diff ============================================================================== --- ofbiz/branches/release16.11/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ReplaceImage.java (original) +++ ofbiz/branches/release16.11/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ReplaceImage.java Tue Mar 21 09:19:51 2017 @@ -32,13 +32,13 @@ import org.apache.ofbiz.base.util.UtilPr import org.apache.ofbiz.base.util.UtilValidate; import org.apache.ofbiz.base.util.string.FlexibleStringExpander; import org.apache.ofbiz.entity.Delegator; -import org.apache.ofbiz.entity.GenericValue; import org.apache.ofbiz.entity.GenericEntityException; +import org.apache.ofbiz.entity.GenericValue; import org.apache.ofbiz.entity.util.EntityQuery; import org.apache.ofbiz.entity.util.EntityUtilProperties; import org.apache.ofbiz.service.DispatchContext; -import org.apache.ofbiz.service.LocalDispatcher; import org.apache.ofbiz.service.GenericServiceException; +import org.apache.ofbiz.service.LocalDispatcher; import org.apache.ofbiz.service.ServiceUtil; public class ReplaceImage{ @@ -68,7 +68,7 @@ public class ReplaceImage{ } } else{ - String errMsg = UtilProperties.getMessage(resourceError, "ProductPleaseChooseImageToReplace", locale); + String errMsg = UtilProperties.getMessage(resourceError, "ProductPleaseChooseImageToReplace", locale); Debug.logError(errMsg, module); return ServiceUtil.returnError(errMsg); } @@ -116,17 +116,13 @@ public class ReplaceImage{ productContentCtx.put("userLogin", userLogin); dispatcher.runSync("removeProductContentAndImageFile", productContentCtx); } - } catch (GenericEntityException gee) { + } catch (GenericEntityException | GenericServiceException e) { String errMsg = UtilProperties.getMessage(resourceError, "ProductCannotReplaceImage", locale); - Debug.logError(errMsg, module); + Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); - } catch (GenericServiceException gse) { + } catch (Exception e) { String errMsg = UtilProperties.getMessage(resourceError, "ProductCannotReplaceImage", locale); - Debug.logError(errMsg, module); - return ServiceUtil.returnError(errMsg); - } catch (Exception gse) { - String errMsg = UtilProperties.getMessage(resourceError, "ProductCannotReplaceImage", locale); - Debug.logError(errMsg, module); + Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } String successMsg = UtilProperties.getMessage(resource, "ProductReplaceImageSuccessfully", locale); |
Free forum by Nabble | Edit this page |