summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2012-11-28 18:19:13 (GMT)
committer mconway <michael.c.conway@gmail.com>2012-11-28 18:19:13 (GMT)
commitac651a0c8e29e497e5e98ce7992ec2da87b91d2f (patch)
tree7a4fab4d788778efaf9fd4065a8f5d180a222d6a
parentfa39f9e8877b29c4d1eb4a7d84c703106d561cd0 (diff)
downloadQCG-Data-ac651a0c8e29e497e5e98ce7992ec2da87b91d2f.zip
QCG-Data-ac651a0c8e29e497e5e98ce7992ec2da87b91d2f.tar.gz
QCG-Data-ac651a0c8e29e497e5e98ce7992ec2da87b91d2f.tar.bz2
[#1075] no resource defined causes error when serializing shopping cart
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/IdropLiteController.groovy16
-rw-r--r--idrop-web/web-app/js/mydrop/shopping_cart.js10
2 files changed, 13 insertions, 13 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/IdropLiteController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/IdropLiteController.groovy
index 9e7eecc..a8bdfed 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/IdropLiteController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/IdropLiteController.groovy
@@ -61,10 +61,18 @@ class IdropLiteController {
try {
shoppingCartFile = shoppingCartService.serializeShoppingCartAsLoggedInUser(fileShoppingCart, key)
- } catch (NoResourceDefinedException nrd) {
- log.error "no default resource found for copy operation"
- def message = message(code:"message.no.resource")
- response.sendError(500,message)
+ } catch (Exception e) {
+ if (e.message.indexOf("error creating") > -1) {
+ log.error "no default resource found for copy operation"
+ def message = message(code:"message.no.resource")
+ response.sendError(500,message)
+ return
+ } else {
+ log.error "error serializing shopping cart"
+ def message = message(e.message)
+ response.sendError(500,e.message)
+ return
+ }
}
log.info("cart serialized to file:${shoppingCartFile}")
}
diff --git a/idrop-web/web-app/js/mydrop/shopping_cart.js b/idrop-web/web-app/js/mydrop/shopping_cart.js
index aec2c89..e3499d9 100644
--- a/idrop-web/web-app/js/mydrop/shopping_cart.js
+++ b/idrop-web/web-app/js/mydrop/shopping_cart.js
@@ -255,15 +255,7 @@ function checkOut() {
$(idropLiteShoppingCartSelector).removeAttr('style');
- }).error(function(xhr, status, error) {
- setErrorMessage(xhr.responseText);
- $("#cartToggleDiv").show('slow');
- $("#cartToggleDiv").width = "100%";
- $("#cartToggleDiv").height = "100%";
- $(idropLiteShoppingCartSelector).hide('slow');
-
- });
-
+ });
}