You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/06/29 11:25:09 UTC
[4/4] stratos git commit: fixed not showing exceptions in adding an
application
fixed not showing exceptions in adding an application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/246a5bac
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/246a5bac
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/246a5bac
Branch: refs/heads/master
Commit: 246a5bac06957d01777c0628429de571c6d05553
Parents: 4e84f86
Author: Pubudu Gunatilaka <pu...@gmail.com>
Authored: Mon Jun 29 12:30:49 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Mon Jun 29 14:54:58 2015 +0530
----------------------------------------------------------------------
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/246a5bac/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 5dd0bbc..ad4a208 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -1396,7 +1396,8 @@ public class StratosApiV41Utils {
usedCartridgeGroups.toArray(new String[usedCartridgeGroups.size()]));
} catch (AutoscalerServiceApplicationDefinitionExceptionException e) {
- throw new RestAPIException(e);
+ String message = e.getFaultMessage().getApplicationDefinitionException().getMessage();
+ throw new RestAPIException(message, e);
} catch (RemoteException e) {
throw new RestAPIException(e);
}
@@ -1443,7 +1444,8 @@ public class StratosApiV41Utils {
try {
AutoscalerServiceClient.getInstance().updateApplication(applicationContext);
} catch (AutoscalerServiceApplicationDefinitionExceptionException e) {
- throw new RestAPIException(e);
+ String message = e.getFaultMessage().getApplicationDefinitionException().getMessage();
+ throw new RestAPIException(message, e);
} catch (RemoteException e) {
throw new RestAPIException(e);
}