[rhq] modules/core

John Sanda jsanda at fedoraproject.org
Wed Aug 22 19:38:26 UTC 2012


 modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java |   11 ++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit e21a7eb14096c4b23b638ff9028eb04857710e64
Author: John Sanda <jsanda at Johns-MacBook-Pro.local>
Date:   Wed Aug 22 15:22:43 2012 -0400

    [BZ 802796] Do not report entire stack trace for display in UI
    
    After some discussion it has been decied to *not* display the entire stack trace in the
    resource creation error message. Instead we will display the new, detailed error message
    along with the more brief exception message that reports the plugin component method in
    which the time out occurred. The full stack trace can still however be obtained from the
    agent logs with DEBUG logging enabled.

diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java
index b3c65bd..8d34e9f 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java
@@ -163,8 +163,15 @@ public class CreateResourceRunner implements Callable, Runnable {
             status = CreateResourceStatus.TIMED_OUT;
             errorMessage = "The time out has been exceeded; however, the deployment may have been successful. You " +
                 "may want to run a discovery scan to see if the deployment did complete successfully. Also consider " +
-                "using a higher time out value for future deployments.\n\nRoot Cause:\n";
-            errorMessage += ThrowableUtil.getStackAsString(e);
+                "using a higher time out value for future deployments.";
+
+            if (log.isDebugEnabled()) {
+                log.debug("Failed to create resource for " + report + ". " + errorMessage, e);
+            } else {
+                log.info("Failed to create resource for " + report + ". " + errorMessage, e);
+            }
+
+            errorMessage += "\n\nRoot Cause:\n" + e.getMessage();
         } catch (Throwable t) {
             status = CreateResourceStatus.FAILURE;
             errorMessage = ThrowableUtil.getStackAsString(t);




More information about the rhq-commits mailing list