Author: jleroux
Date: Fri Sep 4 14:57:12 2009
New Revision: 811433
URL:
http://svn.apache.org/viewvc?rev=811433&view=revLog:
"Applied fix from trunk for revision: 810921" (finally done by hand : it fixes a bug in ShoppingCartEvents.java but does not introduce a new method in ServiceUtil.java)
Modified:
ofbiz/branches/release09.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Modified: ofbiz/branches/release09.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=811433&r1=811432&r2=811433&view=diff==============================================================================
--- ofbiz/branches/release09.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/release09.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Fri Sep 4 14:57:12 2009
@@ -1293,12 +1293,17 @@
ShoppingCart cart = null;
try {
- Map outMap = dispatcher.runSync("loadCartFromOrder",
+ Map<String, Object> outMap = dispatcher.runSync("loadCartFromOrder",
UtilMisc.<String, Object>toMap("orderId", quoteId,
"skipProductChecks", Boolean.TRUE, // the products have already been checked in the order, no need to check their validity again
"userLogin", userLogin));
+ if (ServiceUtil.isError(outMap) || ServiceUtil.isFailure(outMap)) {
+ request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(outMap));
+ return "error";
+ }
cart = (ShoppingCart) outMap.get("shoppingCart");
+
} catch (GenericServiceException exc) {
request.setAttribute("_ERROR_MESSAGE_", exc.getMessage());
return "error";