You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/03/07 17:07:02 UTC

git commit: Core: Fixed error in 501 HTML view

Updated Branches:
  refs/heads/master 3d8bada10 -> 7b10fa8fc


Core: Fixed error in 501 HTML view

This view is used to notify client that given operation
is not supported by backend. In many cases this is not an
exception and thus does not have any backtrace associated.
This patch will prevent to show backtrace in browser, if there
is no backtrace in exception.


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/7b10fa8f
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/7b10fa8f
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/7b10fa8f

Branch: refs/heads/master
Commit: 7b10fa8fcb3559bd4f2d57c37a0b325573a66a2f
Parents: 3d8bada
Author: Michal Fojtik <mf...@redhat.com>
Authored: Wed Mar 7 17:06:33 2012 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Wed Mar 7 17:06:33 2012 +0100

----------------------------------------------------------------------
 server/views/errors/501.html.haml |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/7b10fa8f/server/views/errors/501.html.haml
----------------------------------------------------------------------
diff --git a/server/views/errors/501.html.haml b/server/views/errors/501.html.haml
index 19cf090..428e452 100644
--- a/server/views/errors/501.html.haml
+++ b/server/views/errors/501.html.haml
@@ -15,11 +15,12 @@
       - else
         %em No details
 
-  %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
-    %h3 Backtrace
-    %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
-      %li
-        %pre=@error.backtrace.join("\n")
+  - if @error.class.method_defined? :backtrace
+    %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+      %h3 Backtrace
+      %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
+        %li
+          %pre=@error.backtrace.join("\n") unless @error.backtrace.nil?
 
   %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
     %h3 Parameters