You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/03/10 08:57:26 UTC
stratos git commit: throwing exception if can't get deployment policy
from cc
Repository: stratos
Updated Branches:
refs/heads/master fa8f6593b -> 55cd917f1
throwing exception if can't get deployment policy from cc
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/55cd917f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/55cd917f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/55cd917f
Branch: refs/heads/master
Commit: 55cd917f1268a874be10d887d5f13f58f4d854ee
Parents: fa8f659
Author: R-Rajkumar <rr...@gmail.com>
Authored: Tue Mar 10 13:25:05 2015 +0530
Committer: R-Rajkumar <rr...@gmail.com>
Committed: Tue Mar 10 13:25:05 2015 +0530
----------------------------------------------------------------------
.../stratos/autoscaler/monitor/MonitorFactory.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/55cd917f/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
index 718d672..e30957c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
@@ -257,10 +257,9 @@ public class MonitorFactory {
try {
deploymentPolicy = CloudControllerServiceClient.getInstance().getDeploymentPolicy(deploymentPolicyId);
} catch (Exception e) {
- String msg = String.format("Error while getting deployment policy from cloud controller [deployment-policy-id] %s", deploymentPolicy);
+ String msg = String.format("Error while getting deployment policy from cloud controller [deployment-policy-id] %s", deploymentPolicyId);
log.error(msg, e);
- //TODO throw an exception
- return null;
+ throw new RuntimeException(msg, e);
}
List<Partition> partitionList = new ArrayList<Partition>();
@@ -273,8 +272,7 @@ public class MonitorFactory {
} catch (Exception e) {
String msg = String.format("Error while getting deployment policy from cloud controller [network-partition-id] %s", networkPartitionRef.getId());
log.error(msg, e);
- //TODO throw an exception
- return null;
+ throw new RuntimeException(msg, e);
}
if (networkPartition != null) {
@@ -288,8 +286,7 @@ public class MonitorFactory {
} catch (Exception e) {
String msg = String.format("Error while validating deployment policy from cloud controller [network-partition-id] %s", networkPartitionRef.getId());
log.error(msg, e);
- //TODO throw an exception
- return null;
+ throw new RuntimeException(msg, e);
}
}
}