Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE049176AE for ; Fri, 31 Oct 2014 14:26:45 +0000 (UTC) Received: (qmail 1047 invoked by uid 500); 31 Oct 2014 14:26:45 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 1019 invoked by uid 500); 31 Oct 2014 14:26:45 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 1010 invoked by uid 99); 31 Oct 2014 14:26:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2014 14:26:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7A45D8B8454; Fri, 31 Oct 2014 14:26:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: srimanth@apache.org To: commits@ambari.apache.org Message-Id: <9d2211605f114724aac2e8d0ff94726b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-8058. Slider View: view initialization errors should be more descriptive (srimanth) Date: Fri, 31 Oct 2014 14:26:45 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk fb016d5cc -> 93d8fdf0f AMBARI-8058. Slider View: view initialization errors should be more descriptive (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/93d8fdf0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/93d8fdf0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/93d8fdf0 Branch: refs/heads/trunk Commit: 93d8fdf0fb8749a6702c9b903d4dfe1cb3ec2dbe Parents: fb016d5 Author: Srimanth Gunturi Authored: Thu Oct 30 20:00:27 2014 -0700 Committer: Srimanth Gunturi Committed: Fri Oct 31 07:25:58 2014 -0700 ---------------------------------------------------------------------- .../ambari/view/slider/SliderAppsViewControllerImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/93d8fdf0/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java index 6eebf9a..afeaab7 100644 --- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java +++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java @@ -286,9 +286,14 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController { new ViewStatus.Validation("Ambari cluster with ID [" + clusterName + "] was not found on Ambari server")); } - } catch (Throwable t) { - logger.warn("Exception determining view status", t); - status.getValidations().add(new ViewStatus.Validation(t.getMessage())); + } catch (Throwable e) { + logger.warn("Exception determining view status", e); + String message = e.getClass().getName() + ": " + e.getMessage(); + if (e instanceof RuntimeException && e.getCause() != null) { + message = e.getCause().getClass().getName() + ": " + e.getMessage(); + } + message = String.format("Unable to initialize Slider view: %s", message); + status.getValidations().add(new ViewStatus.Validation(message)); } } else { status