svn commit: r571621 - /ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

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

svn commit: r571621 - /ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

jleroux@apache.org
Author: jleroux
Date: Fri Aug 31 15:22:52 2007
New Revision: 571621

URL: http://svn.apache.org/viewvc?rev=571621&view=rev
Log:
Reverted on Davis's advice (was the original committer of the change in trunk)

Modified:
    ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=571621&r1=571620&r2=571621&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Fri Aug 31 15:22:52 2007
@@ -108,7 +108,7 @@
             }
         }
         if (this.orderHeader == null) {
-            throw new IllegalArgumentException("Order header passed in is not valid for orderId [" + orderHeader.getString("orderId") + "]");
+            throw new IllegalArgumentException("Order header is not valid");
         }
     }
 
@@ -125,12 +125,7 @@
         try {
             this.orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId));
         } catch (GenericEntityException e) {
-            String errMsg = "Error finding order with ID [" + orderId + "]: " + e.toString();
-            Debug.logError(e, errMsg, module);
-            throw new IllegalArgumentException(errMsg);
-        }
-        if (this.orderHeader == null) {
-            throw new IllegalArgumentException("Order not found with orderId [" + orderId + "]");
+            throw new IllegalArgumentException("Invalid orderId");
         }
     }
 
@@ -160,7 +155,7 @@
             GenericValue productStore = delegator.findByPrimaryKeyCache("ProductStore", UtilMisc.toMap("productStoreId", productStoreId));
             return productStore;
         } catch (GenericEntityException ex) {
-            Debug.logError(ex, "Failed to get product store for order header [" + orderHeader + "] due to exception "+ ex.getMessage(), module);
+            Debug.logError("Failed to get product store for order header [" + orderHeader + "] due to exception "+ ex.getMessage(), module);
             return null;
         }
     }