summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy')
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy42
1 files changed, 26 insertions, 16 deletions
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
index 99bf173..9b74887 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
@@ -348,26 +348,36 @@ class BrowseController {
}
def collectionAndDataObjectListAndSearchAO = irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)
- def collectionAndDataObjectList = collectionAndDataObjectListAndSearchAO.listDataObjectsAndCollectionsUnderPath(parent)
- log.debug("retrieved collectionAndDataObjectList: ${collectionAndDataObjectList}")
- collectionAndDataObjectList.each {
+ try {
- if (it.isDataObject()) {
- icon = "../images/file.png"
- state = "open"
- type = "file"
- } else {
- icon = "folder"
- state = "closed"
- type = "folder"
- }
+ def collectionAndDataObjectList = collectionAndDataObjectListAndSearchAO.listDataObjectsAndCollectionsUnderPath(parent)
+ log.debug("retrieved collectionAndDataObjectList: ${collectionAndDataObjectList}")
+ collectionAndDataObjectList.each {
- def attrBuf = ["id":it.formattedAbsolutePath, "rel":type, "absPath":it.formattedAbsolutePath]
- jsonBuff.add(
- ["data": it.nodeLabelDisplayValue,"attr":attrBuf, "state":state,"icon":icon, "type":type]
- )
+ if (it.isDataObject()) {
+ icon = "../images/file.png"
+ state = "open"
+ type = "file"
+ } else {
+ icon = "folder"
+ state = "closed"
+ type = "folder"
+ }
+
+ def attrBuf = ["id":it.formattedAbsolutePath, "rel":type, "absPath":it.formattedAbsolutePath]
+
+ jsonBuff.add(
+ ["data": it.nodeLabelDisplayValue,"attr":attrBuf, "state":state,"icon":icon, "type":type]
+ )
+ }
+ } catch (ZoneUnavailableException e) {
+ log.error("zone unavailable exception", e)
+ response.sendError(500, message(code:"message.zone.unavailable"))
+ } catch (JargonException e) {
+ log.error("jargon exception", e)
+ response.sendError(500, e.message)
}
} else {
throw new JargonException("invalid path type:${pathType}")