From: Andreas Bauer
---
src/webui/app/controllers/application.rb | 9 ++++++++-
src/webui/app/views/error.rhtml | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/webui/app/controllers/application.rb b/src/webui/app/controllers/application.rb
index c93ce03..e694863 100644
--- a/src/webui/app/controllers/application.rb
+++ b/src/webui/app/controllers/application.rb
@@ -69,7 +69,14 @@ class ApplicationController < ActionController::Base
@code = exception.message.root.elements['code'].text
render :template => 'error', :status => @code
else
- render :template => 'error', :status => 500
+ if( exception.message.kind_of? REXML::Document )
+ @error_message = exception.message.root.elements['summary'].text
+ @code = exception.message.root.elements['code'].text
+ else
+ @error_message = exception.message
+ @code = 500
+ end
+ render :template => 'error', :status => @code
#raise exception
end
end
diff --git a/src/webui/app/views/error.rhtml b/src/webui/app/views/error.rhtml
index f38eb41..3b14cce 100644
--- a/src/webui/app/views/error.rhtml
+++ b/src/webui/app/views/error.rhtml
@@ -17,7 +17,7 @@ A non existing page was requested. Please try again!<br />
Please contact the OpenSUSE admin to get proper permissions for the user account.
<% else -%>
<h2>Server Error</h2>
-<%= @error_message %>
+<p><%= @error_message %></p>
<br>
Please contact the OpenSUSE admin.
<% end -%>
--
1.7.7
--
To unsubscribe, e-mail: obs-commits+unsubscribe@opensuse.org
To contact the owner, e-mail: obs-commits+owner@opensuse.org