svn commit: r822195 - /ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java

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

svn commit: r822195 - /ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java

ashish-18
Author: ashish
Date: Tue Oct  6 10:24:31 2009
New Revision: 822195

URL: http://svn.apache.org/viewvc?rev=822195&view=rev
Log:
If configuration settings are missing, may be either from data setup or from property file then provide verbose error message.

Modified:
    ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java

Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java?rev=822195&r1=822194&r2=822195&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java Tue Oct  6 10:24:31 2009
@@ -75,6 +75,10 @@
         Map<String, Object> result = FastMap.newInstance();
         try {
             Map<String, Object> eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator);
+            if (UtilValidate.isEmpty(eBayConfigResult)) {
+                String eBayConfigErrorMsg = "Configuration settings are missing for connecting to eBay server.";
+                return ServiceUtil.returnError(eBayConfigErrorMsg);
+            }
             
             StringBuffer sellerTransactionsItemsXml = new StringBuffer();
             if (!ServiceUtil.isFailure(buildGetSellerTransactionsRequest(context, sellerTransactionsItemsXml, eBayConfigResult.get("token").toString()))) {
@@ -106,7 +110,7 @@
                 }
             }
         } catch (Exception e) {
-            String errMsg = UtilProperties.getMessage(resource, "buildEbayConfig.exceptionInGetOrdersFromEbay========" + e.getMessage(), locale);
+            String errMsg = UtilProperties.getMessage(resource, "buildEbayConfig.exceptionInGetOrdersFromEbay" + e.getMessage(), locale);
             return ServiceUtil.returnError(errMsg);
         }
         return result;