Author: lektran
Date: Mon May 21 00:28:30 2007
New Revision: 540047
URL:
http://svn.apache.org/viewvc?view=rev&rev=540047Log:
Applied fix from trunk for revision: 539012
Modified:
ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java
Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java?view=diff&rev=540047&r1=540046&r2=540047==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon May 21 00:28:30 2007
@@ -19,7 +19,6 @@
package org.ofbiz.order.order;
import java.math.BigDecimal;
-import java.lang.Math;
import java.sql.Timestamp;
import java.text.NumberFormat;
import java.text.ParseException;
@@ -4084,7 +4083,11 @@
}
// set the payment method
- cart.addPayment(paymentMethodId);
+ try {
+ cart.addPayment(paymentMethodId);
+ } catch (IllegalArgumentException e) {
+ return ServiceUtil.returnError(e.getMessage());
+ }
// save the order (new tx)
Map createResp;