[rhq] Branch 'release/jon3.1.x' - modules/core

John Sanda jsanda at fedoraproject.org
Wed Aug 22 20:08:43 UTC 2012


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

New commits:
commit eca29122a7681997a7ff4d92880c2528ce84c6c8
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.
    
    Conflicts:
    
    	modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java

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 cdc2c86..bd20c02 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
@@ -161,8 +161,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) {
             errorMessage = ThrowableUtil.getStackAsString(t);
             status = CreateResourceStatus.FAILURE;
@@ -201,4 +208,4 @@ public class CreateResourceRunner implements Callable, Runnable {
          return (status == CreateResourceStatus.SUCCESS) || (status == CreateResourceStatus.INVALID_CONFIGURATION)
                  || (status == CreateResourceStatus.INVALID_ARTIFACT);
      }
- }
\ No newline at end of file
+ }




More information about the rhq-commits mailing list