Adding error messages

Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/ef743aab
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/ef743aab
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/ef743aab

Branch: refs/heads/master
Commit: ef743aab2e8af10892a72055aeec575425700b75
Parents: 31dbd62
Author: anuruddhal <[email protected]>
Authored: Tue Jul 28 10:46:08 2015 +0530
Committer: anuruddhal <[email protected]>
Committed: Tue Jul 28 10:46:08 2015 +0530

----------------------------------------------------------------------
 .../stratos/rest/endpoint/api/StratosApiV41Utils.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/ef743aab/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 5c0f0ac..b0e6c42 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
@@ -156,7 +156,7 @@ public class StratosApiV41Utils {
             log.error(msg, e);
             throw new RestAPIException(msg);
         } catch (RemoteException e) {
-            String msg = "Could not add cartridge";
+            String msg = "Could not add cartridge. " + e.getMessage();
             log.error(msg, e);
             throw new RestAPIException(msg);
         } catch (CloudControllerServiceInvalidIaasProviderExceptionException 
e) {
@@ -194,19 +194,19 @@ public class StratosApiV41Utils {
                         cartridgeBean.getType()));
             }
         } catch 
(CloudControllerServiceCartridgeDefinitionNotExistsExceptionException e) {
-            String msg = "Could not add cartridge";
+            String msg = "Could not update cartridge. Cartridge definition 
doesn't exists.";
             log.error(msg, e);
             throw new RestAPIException(msg);
         } catch 
(CloudControllerServiceInvalidCartridgeDefinitionExceptionException e) {
-            String msg = "Could not add cartridge";
+            String msg = "Could not update cartridge. Invalid cartridge 
definition.";
             log.error(msg, e);
             throw new RestAPIException(msg);
         } catch (RemoteException e) {
-            String msg = "Could not add cartridge";
+            String msg = "Could not update cartridge. " + e.getMessage();
             log.error(msg, e);
             throw new RestAPIException(msg);
         } catch (CloudControllerServiceInvalidIaasProviderExceptionException 
e) {
-            String msg = "Could not add cartridge";
+            String msg = "Could not update cartridge. Invalid IaaS provider.";
             log.error(msg, e);
             throw new RestAPIException(msg);
         }

Reply via email to