Martin Peřina has uploaded a new change for review.

Change subject: webadmin: Show stacktrace for unhandled execptions
......................................................................

webadmin: Show stacktrace for unhandled execptions

Add stacktrace to dialog shown to users to be able to identify exception
without any error in engine.log

Change-Id: I06359433499c444625b69e3f244e2209a2e8d392
Bug-Url: https://bugzilla.redhat.com/1039248
Signed-off-by: Martin Perina <[email protected]>
---
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/96/23096/1

diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
index aff764e..ca8877b 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
@@ -1194,9 +1194,15 @@
             errorMessage = getConstants().requestToServerFailedWithCode() + ": 
" //$NON-NLS-1$
                     + ((StatusCodeException) caught).getStatusCode();
         } else {
-            errorMessage =
-                    getConstants().requestToServerFailed()
-                            + ": " + caught.getLocalizedMessage(); 
//$NON-NLS-1$
+            StringBuilder sb = new 
StringBuilder(getConstants().requestToServerFailed());
+            sb.append(": "); //$NON-NLS-1$
+            sb.append(caught.getLocalizedMessage());
+            for (StackTraceElement ste: caught.getStackTrace()) {
+                sb.append("\n\t"); //$NON-NLS-1$
+                sb.append(ste.toString());
+
+            }
+            errorMessage = sb.toString();
         }
         failureEventHandler(errorMessage);
     }


-- 
To view, visit http://gerrit.ovirt.org/23096
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06359433499c444625b69e3f244e2209a2e8d392
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to