You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2015/05/21 16:13:46 UTC
[19/23] stratos git commit: handling RemoteException
handling RemoteException
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/ca916d42
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/ca916d42
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/ca916d42
Branch: refs/heads/master
Commit: ca916d42719498d7af52085b500bfd1bba5909aa
Parents: 4c6da2e
Author: Dinithi <di...@wso2.com>
Authored: Wed May 20 23:03:37 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Wed May 20 23:03:37 2015 +0530
----------------------------------------------------------------------
.../java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca916d42/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 1a0ca88..0a10a59 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -432,8 +432,7 @@ public class StratosApiV41 extends AbstractApi {
return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
String.format("Cartridge deleted successfully: [cartridge-type] %s", cartridgeType))).build();
} catch (RemoteException e) {
- return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
- ResponseMessageBean.ERROR, e.getMessage())).build();
+ throw new RestAPIException(e.getMessage());
} catch (CloudControllerServiceInvalidCartridgeTypeExceptionException e) {
return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, e.getFaultMessage().getInvalidCartridgeTypeException().getMessage()))