usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ry...@apache.org
Subject [1/2] incubator-usergrid git commit: [USERGRID-515] catch exception in ApplicationResource.executePut if application restore fails
Date Mon, 20 Apr 2015 16:17:13 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-336 [created] 9b1bd03e8


[USERGRID-515] catch exception in ApplicationResource.executePut if application restore fails


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/c77835a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/c77835a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/c77835a6

Branch: refs/heads/USERGRID-336
Commit: c77835a6650eaa645d8cc627efa3c883078011d0
Parents: 778f49b
Author: ryan bridges <ryanb@apache.org>
Authored: Fri Apr 10 11:08:28 2015 -0400
Committer: ryan bridges <ryanb@apache.org>
Committed: Fri Apr 10 11:08:28 2015 -0400

----------------------------------------------------------------------
 .../usergrid/rest/applications/ApplicationResource.java       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c77835a6/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java
b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java
index 2c252e7..0760036 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java
@@ -508,8 +508,11 @@ public class ApplicationResource extends ServiceResource {
             throw new EntityNotFoundException("Application ID " + applicationId + " not found");
         }
 
-        emf.restoreApplication( applicationId );
-
+        try {
+            emf.restoreApplication(applicationId);
+        } catch (EntityNotFoundException enfe){
+            logger.warn("Attempt to restore %s failed: %s", applicationId, enfe.getMessage());
+        }
         ApiResponse response = createApiResponse();
         response.setAction( "restore" );
         response.setApplication( services.getApplication() );


Mime
View raw message