You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/12/08 16:17:47 UTC

[04/50] [abbrv] stratos git commit: Catch a generic Exception in MetadataApi

Catch a generic Exception in MetadataApi


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/272210bb
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/272210bb
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/272210bb

Branch: refs/heads/master
Commit: 272210bbb9c4df3f2b566b583a0702ff4f728d02
Parents: a9ed3c5
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:21:10 2015 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Mon Nov 30 00:33:47 2015 +0530

----------------------------------------------------------------------
 .../stratos/metadata/service/api/MetadataApi.java | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/272210bb/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
index 53174e0..053e030 100644
--- a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
+++ b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
@@ -68,7 +68,7 @@ public class MetadataApi {
                 propertiesArr = new Property[properties.size()];
                 propertiesArr = properties.toArray(propertiesArr);
             }
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = "Error occurred while getting properties ";
             log.error(msg, e);
             throw new RestAPIException(msg, e);
@@ -98,7 +98,7 @@ public class MetadataApi {
                 propertiesArr = new Property[properties.size()];
                 propertiesArr = properties.toArray(propertiesArr);
             }
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = "Error occurred while getting properties ";
             log.error(msg, e);
             throw new RestAPIException(msg, e);
@@ -133,7 +133,7 @@ public class MetadataApi {
                     break;
                 }
             }
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = "Error occurred while getting property";
             log.error(msg, e);
             throw new RestAPIException(msg, e);
@@ -169,7 +169,7 @@ public class MetadataApi {
                     break;
                 }
             }
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = "Error occurred while getting property";
             log.error(msg, e);
             throw new RestAPIException(msg, e);
@@ -194,7 +194,7 @@ public class MetadataApi {
 
         try {
             registry.addPropertyToApplication(applicationId, property);
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = "Error occurred while adding properties ";
             log.error(msg, e);
             throw new RestAPIException(msg, e);
@@ -212,7 +212,7 @@ public class MetadataApi {
 
         try {
             registry.addPropertyToCluster(applicationId, clusterId, property);
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = "Error occurred while adding properties ";
             log.error(msg, e);
             throw new RestAPIException(msg, e);
@@ -232,7 +232,7 @@ public class MetadataApi {
             if (!deleted) {
                 log.warn(String.format("No metadata is associated with given appId %s", applicationId));
             }
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = "Resource attached with appId could not be deleted [application-id] " + applicationId;
             log.error(msg, e);
             throw new RestAPIException(msg, e);
@@ -252,7 +252,7 @@ public class MetadataApi {
             if (!deleted) {
                 log.warn(String.format("No metadata is associated with given appId %s", applicationId));
             }
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = String
                     .format("[application-id] %s [property-name] %s deletion failed ", applicationId, propertyName);
             log.error(msg, e);
@@ -274,7 +274,7 @@ public class MetadataApi {
             if (!deleted) {
                 log.warn(String.format("No metadata is associated with given [application-id] %s", applicationId));
             }
-        } catch (RegistryException e) {
+        } catch (Exception e) {
             String msg = String
                     .format("[application-id] %s [property-name] %s [value] %s deletion failed" + applicationId,
                             propertyName, propertyValue);