deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 1/4] Core: Added more verbose 500 error reports in XML
Date Mon, 23 Jan 2012 11:23:19 GMT
From: Michal Fojtik <mfojtik@redhat.com>

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/views/errors/500.xml.haml |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/server/views/errors/500.xml.haml b/server/views/errors/500.xml.haml
index 69c242e..0827986 100644
--- a/server/views/errors/500.xml.haml
+++ b/server/views/errors/500.xml.haml
@@ -1,5 +1,12 @@
 %error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
   %kind backend_error
-  %backend{ :driver => driver_symbol }
+  %backend{ :driver => driver_symbol, :provider => "#{Thread::current[:provider] ||
ENV['API_PROVIDER'] || 'default'}" }
     %code=response.status
   %message< #{cdata @error.message}
+  - if params
+    %request
+      - params.each do |k, v|
+        %param{ :name => k}=v
+  - if @error.respond_to? :backtrace
+    %backtrace=@error.backtrace.join("\n")
+
-- 
1.7.4.4


Mime
View raw message