Author: sichen
Date: Thu Jun 14 11:50:30 2007 New Revision: 547355 URL: http://svn.apache.org/viewvc?view=rev&rev=547355 Log: Changed returnError to returnFailure in UPS rate inquire services, so failing to get a UPS rate doesn't crash your whole checkout process Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?view=diff&rev=547355&r1=547354&r2=547355 ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Thu Jun 14 11:50:30 2007 @@ -1716,7 +1716,7 @@ return resp; } else { errorList.add("Error status code : " + responseStatusCode); - return ServiceUtil.returnError(errorList); + return ServiceUtil.returnFailure(errorList); } } @@ -2035,7 +2035,7 @@ } catch (IOException e) { String ioeErrMsg = "Error writing the RatingServiceSelectionRequest XML Document to a String: " + e.toString(); Debug.logError(e, ioeErrMsg, module); - return ServiceUtil.returnError(ioeErrMsg); + return ServiceUtil.returnFailure(ioeErrMsg); } // create AccessRequest XML doc @@ -2046,7 +2046,7 @@ } catch (IOException e) { String ioeErrMsg = "Error writing the AccessRequest XML Document to a String: " + e.toString(); Debug.logError(e, ioeErrMsg, module); - return ServiceUtil.returnError(ioeErrMsg); + return ServiceUtil.returnFailure(ioeErrMsg); } // prepare the access/inquire request string @@ -2061,7 +2061,7 @@ } catch (UpsConnectException e) { String uceErrMsg = "Error sending UPS request for UPS Service Rate: " + e.toString(); Debug.logError(e, uceErrMsg, module); - return ServiceUtil.returnError(uceErrMsg); + return ServiceUtil.returnFailure(uceErrMsg); } Debug.logInfo(rateResponseString, module); Document rateResponseDocument = null; @@ -2070,15 +2070,15 @@ } catch (SAXException e2) { String excErrMsg = "Error parsing the RatingServiceSelectionResponse: " + e2.toString(); Debug.logError(e2, excErrMsg, module); - return ServiceUtil.returnError(excErrMsg); + return ServiceUtil.returnFailure(excErrMsg); } catch (ParserConfigurationException e2) { String excErrMsg = "Error parsing the RatingServiceSelectionResponse: " + e2.toString(); Debug.logError(e2, excErrMsg, module); - return ServiceUtil.returnError(excErrMsg); + return ServiceUtil.returnFailure(excErrMsg); } catch (IOException e2) { String excErrMsg = "Error parsing the RatingServiceSelectionResponse: " + e2.toString(); Debug.logError(e2, excErrMsg, module); - return ServiceUtil.returnError(excErrMsg); + return ServiceUtil.returnFailure(excErrMsg); } return handleUpsRateInquireResponse(rateResponseDocument); |
Free forum by Nabble | Edit this page |