ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject git commit: AMBARI-8058. Slider View: view initialization errors should be more descriptive (srimanth)
Date Fri, 31 Oct 2014 14:26:45 GMT
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 <sgunturi@hortonworks.com>
Authored: Thu Oct 30 20:00:27 2014 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
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


Mime
View raw message