Author: lektran
Date: Fri Sep  5 20:01:28 2014
New Revision: 1622779

URL: http://svn.apache.org/r1622779
Log:
Replace dead code with a try/catch block that could actually get hit

Modified:
    
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=1622779&r1=1622778&r2=1622779&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
 Fri Sep  5 20:01:28 2014
@@ -319,8 +319,11 @@ public class ShoppingListServices {
             }
             shoppingListTypeId = shoppingList.getString("shoppingListTypeId");
 
-            OrderReadHelper orh = new OrderReadHelper(orderHeader);
-            if (orh == null) {
+            OrderReadHelper orh;
+            try {
+                orh = new OrderReadHelper(orderHeader);
+            } catch (IllegalArgumentException e) {
+                Debug.logError(e, module);
                 return 
ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderUnableToLoadOrderReadHelper",
 UtilMisc.toMap("orderId",orderId), locale));
             }
 


Reply via email to