Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 22136177ED for ; Wed, 8 Apr 2015 04:42:48 +0000 (UTC) Received: (qmail 72820 invoked by uid 500); 8 Apr 2015 04:42:48 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 72768 invoked by uid 500); 8 Apr 2015 04:42:47 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 72758 invoked by uid 99); 8 Apr 2015 04:42:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 04:42:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6E5B3E1844; Wed, 8 Apr 2015 04:42:47 +0000 (UTC) From: Vishanth To: dev@stratos.apache.org Reply-To: dev@stratos.apache.org References: In-Reply-To: Subject: [GitHub] stratos pull request: Added exception for persisting autoscaler po... Content-Type: text/plain Message-Id: <20150408044247.6E5B3E1844@git1-us-west.apache.org> Date: Wed, 8 Apr 2015 04:42:47 +0000 (UTC) Github user Vishanth commented on a diff in the pull request: https://github.com/apache/stratos/pull/261#discussion_r27942541 --- Diff: components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java --- @@ -117,11 +117,17 @@ private void persist(Object dataObj, String resourcePath) throws AutoScalerExcep } public void persistAutoscalerPolicy(AutoscalePolicy autoscalePolicy) { - String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE + AutoscalerConstants.AS_POLICY_RESOURCE + "/" + autoscalePolicy.getId(); - persist(autoscalePolicy, resourcePath); - if (log.isDebugEnabled()) { - log.debug(String.format("Autoscaler policy written to registry: [id] %s [name] %s [description] %s", - autoscalePolicy.getId(), autoscalePolicy.getDisplayName(), autoscalePolicy.getDescription())); + try { + String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE + + AutoscalerConstants.AS_POLICY_RESOURCE + "/" + autoscalePolicy.getId(); + persist(autoscalePolicy, resourcePath); + if (log.isDebugEnabled()) { + log.debug(String.format("Autoscaler policy written to registry: [id] %s [name] %s [description] %s", + autoscalePolicy.getId(), autoscalePolicy.getDisplayName(), autoscalePolicy.getDescription())); + } + } catch (Exception e) { --- End diff -- Noted. Will do. --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---