Github user prabathabey commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/295#discussion_r35573982
  
    --- Diff: 
components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
 ---
    @@ -123,13 +128,31 @@ public static void addCartridge(CartridgeBean 
cartridgeDefinition) throws RestAP
                             "Successfully added cartridge: [cartridge-type] %s 
",
                             cartridgeDefinition.getType()));
                 }
    -        } catch (Exception e) {
    +        }catch 
(CloudControllerServiceCartridgeAlreadyExistsExceptionException e) {
    +            String msg = "Could not add cartridge";
    +            log.error(msg, e);
    +            throw new RestAPIException(msg);
    +        } catch 
(CloudControllerServiceInvalidCartridgeDefinitionExceptionException e) {
    --- End diff --
    
    If there's nothing specific to be logged when each of these exceptions was 
caught, might be a good option to use "|" notation to have them all clustered 
into one catch block, which would improve readability of the code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to