Repository: stratos Updated Branches: refs/heads/master 88172d313 -> 6ad97d03f
Updating error messages in autoscaler service implementation Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/6ad97d03 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/6ad97d03 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/6ad97d03 Branch: refs/heads/master Commit: 6ad97d03f4ed03aed5c007aaf2ddcee86052cff2 Parents: 88172d3 Author: Imesh Gunaratne <[email protected]> Authored: Sat Mar 28 03:12:04 2015 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Sat Mar 28 03:12:04 2015 +0530 ---------------------------------------------------------------------- .../autoscaler/services/impl/AutoscalerServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/6ad97d03/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java index 25f9d7e..39972de 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java @@ -399,12 +399,12 @@ public class AutoscalerServiceImpl implements AutoscalerService { @Override public void deleteApplication(String applicationId) { - try { ApplicationContext applicationContext = AutoscalerContext.getInstance().getApplicationContext(applicationId); Application application = ApplicationHolder.getApplications().getApplication(applicationId); if ((applicationContext == null) || (application == null)) { - String msg = String.format("Application not found: [application-id] %s", applicationId); + String msg = String.format("Application cannot be deleted, application not found: [application-id] %s", + applicationId); throw new RuntimeException(msg); } @@ -415,8 +415,8 @@ public class AutoscalerServiceImpl implements AutoscalerService { } if (application.getInstanceContextCount() > 0) { - String message = String.format("Application undeployment process is still in progress: " + - "[application-id] %s", applicationId); + String message = String.format("Application cannot be deleted, undeployment process is still in " + + "progress: [application-id] %s", applicationId); log.error(message); throw new RuntimeException(message); }
