You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ma...@apache.org on 2013/12/12 11:46:53 UTC
git commit: Add error handling in cartridge subscription
Updated Branches:
refs/heads/master 96c4f3c94 -> 9648a38ce
Add error handling in cartridge subscription
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/9648a38c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/9648a38c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/9648a38c
Branch: refs/heads/master
Commit: 9648a38ce3fd5ecf8ba50904d0c5f0c4c1e01cee
Parents: 96c4f3c
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Thu Dec 12 16:16:22 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Thu Dec 12 16:16:22 2013 +0530
----------------------------------------------------------------------
.../java/org/apache/stratos/cli/RestCommandLineService.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9648a38c/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 6fb56be..0f9d30e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -338,6 +338,9 @@ public class RestCommandLineService {
if (subscription.equals("" + CliConstants.RESPONSE_NO_CONTENT)) {
System.out.println("Duplicate alias. Please choose different alias");
return;
+ } else if (subscription.equals("" + CliConstants.RESPONSE_INTERNAL_SERVER_ERROR)) {
+ System.out.println("Error in backend");
+ return;
}
String subscriptionJSON = subscription.substring(20, subscription.length() -1);
@@ -374,6 +377,9 @@ public class RestCommandLineService {
if (subscriptionOutput.equals("" + CliConstants.RESPONSE_NO_CONTENT)) {
System.out.println("Duplicate alias. Please choose different alias");
return;
+ } else if (subcriptionConnectInfo.equals("" + CliConstants.RESPONSE_INTERNAL_SERVER_ERROR)) {
+ System.out.println("Error in backend");
+ return;
}
String subscriptionOutputJSON= subscriptionOutput.substring(20, subscriptionOutput.length() -1);